/** * Get anim name of images. * * @param $anim * @return mixed */ public function getAnimName() { $anim = $this->getAttribute('anim'); $images_anim = Config::getConfigValueByKey('images_anim'); if ($images_anim && is_array($images_anim) && array_key_exists($anim, $images_anim)) { return $images_anim[$anim]; } return null; }
/** * compose images anim variable. */ private function composeImageAnim() { View::composer(['memory.create'], function ($view) { $view->with(['anim' => Config::getConfigValueByKey('images_anim')]); }); View::composer(['memory.show'], function ($view) { $view->with(['images_anim' => Response::json(Config::getConfigValueByKey('images_anim'))->getContent()]); }); }
/** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { if (Config::getConfigValueByKey('is_open')) { return $next($request); } if (!Session::has('user')) { return Redirect::to('/auth'); } return $next($request); }
/** * compose skin. */ private function composeSkin() { View::composer(['manage.options'], function ($view) { $view->with(['skin' => Config::getConfigValueByKey('skin')]); }); }
/** * Get token kind. * * @return mixed */ public function getKind() { $kind_map = Config::getConfigValueByKey('auth_kind'); return $kind_map[$this->getAttribute('kind')]; }