Support the ongoing development of Laravel.io →
IOC Validation Architecture
Last updated 2 years ago.
0
Solution

Hi, have you tried this inside your authorize method:

$employee = $this->route->parameter('employee');
var_dump($employee);

Cheers!

Last updated 2 years ago.
0

Thanks a lot. It was a bit tricky due to usage of controller routes.

get('employee/hire/{employee}', 'App\EmployeeController@getHire');
post('employee/hire/{employee}', 'App\EmployeeController@postHire');
Route::controller('employee', 'App\EmployeeController');
Last updated 2 years ago.
0

A little advice: avoid implicit routing as much as possible.

Regards,

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Schnoop schnoop Joined 27 Aug 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.