Support the ongoing development of Laravel.io →
posted 9 years ago
Views
Last updated 1 year 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 year ago.
0

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

Last updated 1 year 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 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Joe96 joe96 Joined 28 Apr 2014

Moderators

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

Your logo here?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.