Undefined property: Shanmuga\LaravelEntrust\Middleware\LaravelEntrustAbility::$auth
Closed this issue · 1 comments
bikash-s-bhandari commented
Not able to use ability as middleware in laravel 9
Route::get('', ['as' => '', 'middleware' => ['ability:super-admin,student-index'],'uses' => 'StudentController@index']);
Error causing due to
if ($this->auth->guest() || !$request->user()->ability($roles, $permissions, [ 'validate_all' => $validateAll ])) {
return $this->unauthorized();
}
In LaravelEnthrustAbility.php
shanmuga3 commented
This issue is fixed, You can use dev-main to get updated