Support the ongoing development of Laravel.io →
posted 8 years ago
Requests
Last updated 6 months ago.
0

It's not a bug. It's expected behaviour.

You don't say, but I assume you're issuing a GET request to http://yoursite.tld/admin/invoice/settings.

In your first example that satisfies the pattern admin/invoice/{resource} which maps to the show() method. This is explained here in the docs.

In the second example, your custom-defined route is the first match giving the result that you were hoping for.

To avoid this sort of confusion, it's generally best to put your most specific route definitions first.

Last updated 6 months ago.
0

Thank you peter for the enlightenment.

Last updated 6 months ago.
0

Sign in to participate in this thread!

Cloudways

Your banner here too?

Sheldonnn sheldonnn Joined 24 Feb 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.

© 2022 Laravel.io - All rights reserved.