EbrahemSamer
4 months ago
258
3
Laravel

How to make laravel differ between routes with parameters and regular routes ?

Posted 4 months ago by EbrahemSamer

I've this route.

Route::patch('/company/{id}', '[email protected]')->middleware(['auth','onlycompany']);

and this one.

Route::patch('/company/profile', '[email protected]');

problem is the first one is executed whenever I call company/profile

how to make it understand which is parameters and which is regular string.

thanks

Please sign in or create an account to participate in this conversation.