/** * __construct. * * @param AdminManager $adminManager */ public function __construct(AdminManager $adminManager) { // Must call parent __construct otherwise // we need to redeclare checkpermissions // middleware for authentication check parent::__construct($adminManager); $this->middleware('checkmodelfound', ['only' => ['getView', 'edit', 'delete']]); $this->modelAdmin = $this->adminManager->getAdminInstance(); $this->model = $this->modelAdmin->model(); view()->share('modelAdmin', $this->modelAdmin); }
/** * __construct. * * @param Guard $auth * @param AdminManager $adminManager */ public function __construct(Guard $auth, AdminManager $adminManager) { parent::__construct($adminManager); $this->auth = $auth; }
/** * Method is called when the appropriate controller * method is unable to be found or called. * * @param array $parameters * * @return */ public function missingMethod($parameters = array()) { return parent::missingMethod(); }