Inheritance: extends App\Http\Controllers\Controller
Example #1
0
 public function __construct()
 {
     parent::__construct();
     $this->middleware('can:view.roles', ['only' => ['getIndex', 'getShow']]);
     $this->middleware('can:create.roles', ['only' => 'postCreate']);
     $this->middleware('can:update.roles', ['only' => ['patchUpdate', 'patchPermissionsUpdate', 'putPermissionsUpdate', 'deletePermissionsDestroy', 'deletePermissionsDestroyAll']]);
     $this->middleware('can:delete.roles', ['only' => 'deleteDestroy']);
 }
Example #2
0
 public function __construct(UserRepositoryInterface $repo)
 {
     $this->repo = $repo;
     parent::__construct();
     $this->middleware('can:view.users', ['only' => ['getIndex', 'getShow']]);
     $this->middleware('can:create.users', ['only' => 'postCreate']);
     $this->middleware('can:update.users', ['only' => ['patchUpdate', 'patchRolesUpdate', 'putRolesUpdate', 'deleteRolesDestroy', 'deleteRolesDestroyAll']]);
     $this->middleware('can:delete.users', ['only' => 'deleteDestroy']);
 }