/** * Create a new controller instance. * * @return void */ public function __construct() { parent::__construct(); $this->page['title'] = trans('admin.manager_menu'); $this->model = new Menu(); $this->lang = Lang::getLocale(); }
public function __construct(PartRepositoryEloquent $partRepo, TireSensorRepositoryEloquent $tireSensorRepo) { parent::__construct(); $this->middleware('auth'); $this->partRepo = $partRepo; $this->tireSensorRepo = $tireSensorRepo; }
/** * @param DbBookRepository $bookRepository * @param AjaxBookRepository $ajaxRepository */ public function __construct(DbBookRepository $bookRepository, AjaxBookRepository $ajaxRepository) { $this->middleware('acl:create_book', ['only' => ['index', 'create', 'store', 'edit', 'update', 'ajaxSearchISBN']]); $this->book = $bookRepository; $this->ajax = $ajaxRepository; parent::__construct(); }
public function __construct() { parent::__construct(); $this->middleware('auth', ['except' => ['index', 'show']]); $user = Sentinel::getUser(); PostService::setUser($user); }
/** * Create a new authentication controller instance. * * @param \Illuminate\Contracts\Auth\Guard $auth * @param \Illuminate\Contracts\Auth\Registrar $registrar * @return void */ public function __construct(Registrar $registrar, Auth $auth, Socialite $socialite, SocialUserRepository $socialUsers) { parent::__construct(); $this->resolve(); $this->loginPath = route('auth.login'); $this->middleware('guest', ['except' => 'getLogout']); }
public function __construct(ProfileService $profileService, UserRepo $userRepo, SaleRepo $saleRepo) { $this->profileService = $profileService; $this->userRepo = $userRepo; $this->saleRepo = $saleRepo; parent::__construct(); }
/** * Create a new password controller instance. * * @param Guard $auth * @param PasswordBroker $passwords */ public function __construct(Guard $auth, PasswordBroker $passwords) { $this->auth = $auth; $this->passwords = $passwords; $this->middleware('guest'); parent::__construct(); }
function __construct() { parent::__construct(); if (!$this->isAdmin($this->getLoggedInUser())) { throw new \Exception("Not allowed, only admin has access", 401); } }
public function __construct() { parent::__construct(); if (\Session::has('admin.username')) { $this->userid = \Session::get('admin.adminid'); } }
/** * FlyersController constructor. */ public function __construct() { // everybody must be authenticated to access the methods // except for the show method $this->middleware('auth', ['except' => ['show']]); parent::__construct(); }
public function __construct(UserRepository $user, RoleRepository $role, PermissionRepository $perms) { parent::__construct(); $this->user = $user; $this->role = $role; $this->permission = $perms; }
/** * Constructor. * * @param type \Litecms\PriceList\Interfaces\PriceListRepositoryInterface $pricelist * * @return type */ public function __construct(PriceListRepositoryInterface $pricelist) { $this->repository = $pricelist; $this->middleware('web'); $this->setupTheme(config('theme.themes.public.theme'), config('theme.themes.public.layout')); parent::__construct(); }
public function __construct() { $this->middleware('auth', ['only' => ['getInvoice', 'postUpdateCart', 'postAddToCart', 'postCheckout', 'postNewAddress', 'postUpdateAddress', 'postUpdateCart', 'putRequestNotification']]); $this->middleware('check-user-restricted', ['only' => ['getInvoice', 'postUpdateCart', 'postAddToCart', 'postCheckout', 'postNewAddress', 'postUpdateAddress', 'postUpdateCart', 'putRequestNotification']]); $this->middleware('verify-user', ['only' => ['getInvoice', 'getCheckout', 'postCheckout', 'postUpdateAddress']]); return parent::__construct(); }
public function __construct() { $this->middleware('auth', ['except' => ['index', 'show']]); $this->middleware('author:article', ['except' => ['index', 'show', 'create']]); view()->share('allTags', Tag::with('articles')->get()); parent::__construct(); }
public function __construct() { $this->middleware('auth', ['only' => ['store']]); // $this->middleware('cachebefore', ['only' => ['show', 'showAjax']]); // $this->middleware('cacheafter', ['only' => ['show', 'showAjax']]); parent::__construct(); }
public function __construct() { Stripe::setApiVersion(config('services.stripe.api_version')); $this->middleware('auth'); $this->postman = new Postman(); parent::__construct(); }
public function __construct() { $this->middleware('web'); $this->middleware('auth:client.web'); $this->setupTheme(config('theme.themes.client.theme'), config('theme.themes.client.layout')); parent::__construct(); }
/** * Create a new authentication controller instance. * * @param \Illuminate\Contracts\Auth\Guard $auth * @param \Illuminate\Contracts\Auth\Registrar $registrar * @return void */ public function __construct(Guard $auth, Registrar $registrar) { parent::__construct(); $this->auth = $auth; $this->registrar = $registrar; $this->middleware('guest', ['except' => 'getLogout']); }
public function __construct() { parent::__construct(); $this->roleModel = new Role(); $this->appModel = new App(); $this->authModel = new Auth(); }
public function __construct() { $this->middleware('api'); $this->middleware('jwt.auth:api'); $this->setupTheme(config('theme.themes.user.theme'), config('theme.themes.user.layout')); parent::__construct(); }
/** * Add the permissions requirements for each route. */ public function __construct() { // Require authentication $this->middleware('auth.permission:member', ['except' => ['dash', 'getMyProfile', 'postMyProfile', 'updatePassword', 'dashSU', 'profile']]); $this->middleware('auth', ['only' => ['dash', 'dashSU', 'getMyProfile', 'postMyProfile', 'updatePassword', 'profile']]); parent::__construct(); }
public function __construct(Request $request) { parent::__construct($request); if (Auth::user()->role != "supadmin") { abort(402, "Unauthorized"); } }
public function __construct() { $this->middleware('auth'); //$this->user = Auth::user(); parent::__construct(); }
/** * @param Permission $permission * @param Role $role * @param Route $route */ public function __construct(Application $app, Audit $audit, Permission $permission, Role $role, Route $route) { parent::__construct($app, $audit); $this->permission = $permission; $this->role = $role; $this->route = $route; }
/** * Abort if request is not ajax * @param Request $request */ public function __construct(Request $request) { if (!$request->ajax() || !Datatable::shouldHandle()) { abort(403, 'Forbidden'); } parent::__construct(); }
public function __construct(){ $this->middleware('auth',[ 'except' => [ 'getIndex','show' ]]); parent::__construct(); }
/** * Constructor. * * @param type \Litecms\Team\Interfaces\TeamRepositoryInterface $team * * @return type */ public function __construct(TeamRepositoryInterface $team) { $this->repository = $team; $this->middleware('web'); $this->setupTheme(config('theme.themes.public.theme'), config('theme.themes.public.layout')); parent::__construct(); }
function __construct() { $this->middleware('auth'); // create a filter for head only // only household heads allowed to create,update, and delete task parent::__construct(); }
public function callConstructor() { $parent = new \ReflectionClass(parent::class); if ($parent->getConstructor()) { parent::__construct(); } }
public function __construct(Filesystem $filesystem, SyncNewsService $syncNewsService, Data $dataRepository) { $this->filesystem = $filesystem; $this->syncNewsService = $syncNewsService; $this->dataRepository = $dataRepository; parent::__construct($dataRepository); }