I'm using Entrust Laravel 5 package. how to use index function in both the middleware in _construct function in controller below:-
Routes
Route::group(['prefix'=> 'v1', 'middleware'=> 'auth:api'], function(){
Route::resource('jobInstructionForm', 'API\V1\JobInstruction\JobInstructionController')->except('create');
});
controller
public function __construct(){
$this->middleware('permission:manage.jobInstructions')->except('edit');
$this->middleware('permission:approve.jobInstructionForm')->only('edit');
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire