shanmuga3/laravel-entrust

Undefined property: Shanmuga\LaravelEntrust\Middleware\LaravelEntrustAbility::$auth

Closed this issue · 1 comments

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

This issue is fixed, You can use dev-main to get updated