Support the ongoing development of Laravel.io →
8 years ago
Views
Last updated 1 month ago.
0

Make a second route Route::get('report, ....`.

And remove the ? from Route::get('report/{id?}'

Also, think about using controllers instead of writing everything in the routes file. Just a suggestion

Last updated 1 month ago.
0

@XoneFobic Thanks. And i think just for displaying a view, there is no need for a controller.

Last updated 1 month ago.
0

@Joe96, you are right. For a view it's probably ok, I do still like to keep things in a certain design pattern. Keeps the routes file nice and tidy :)

Last updated 1 month ago.
0

Sign in to participate in this thread!

LoadForge

Your banner here too?

Joe96 Joe96 joe96 Joined 28 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.