Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GodziLaravel's avatar

Route with middleware AND session

hello , this is the route : Route::resource('/company', 'companyController')->middleware('auth'); after login I create Session('role') this one takes two values : "company" or "driver" I want to add to the Middleware another condition of session('role') thanks

0 likes
1 reply

Please or to participate in this conversation.