当前位置: 首页>>代码示例>>PHP>>正文


PHP elixir函数代码示例

本文整理汇总了PHP中elixir函数的典型用法代码示例。如果您正苦于以下问题:PHP elixir函数的具体用法?PHP elixir怎么用?PHP elixir使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了elixir函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: show

 public function show(Request $request)
 {
     if (!$request->get('email')) {
         // we notify the current user
         Modal::alert([trans('validation.required', ['attribute' => trans('validation.attributes.email')])], 'error');
         return redirect()->route('password.index');
     }
     // we get the user
     if (!($user = Sentinel::findUserByCredentials($request->only('email')))) {
         // we notify the current user
         Modal::alert([trans('auth.message.find.failure', ['email' => $request->get('email')])], 'error');
         return redirect()->route('password.index');
     }
     // we verify that the reminder token is valid
     if (!Reminder::exists($user, $request->only('token'))) {
         // notify the user & redirect
         Modal::alert([trans('auth.message.password_reset.token.expired')], 'error');
         return redirect(route('password.index'));
     }
     // SEO settings
     $this->seo_meta['page_title'] = trans('seo.front.password.show.title');
     $this->seo_meta['meta_desc'] = trans('seo.front.password.show.description');
     $this->seo_meta['meta_keywords'] = trans('seo.front.password.show.keywords');
     // data send to the view
     $data = ['email' => $request->get('email'), 'reminder' => $request->get('token'), 'seo_meta' => $this->seo_meta, 'css' => elixir('css/app.auth.css')];
     return view('pages.front.password-reset')->with($data);
 }
开发者ID:Okipa,项目名称:una.app,代码行数:27,代码来源:PasswordController.php

示例2: index

 /**
  * @return $this
  */
 public function index()
 {
     // SEO Meta settings
     $this->seo_meta['page_title'] = trans('seo.front.registration.title');
     $this->seo_meta['meta_desc'] = trans('seo.front.registration.description');
     $this->seo_meta['meta_keywords'] = trans('seo.front.registration.keywords');
     // og meta settings
     $this->og_meta['og:title'] = trans('seo.front.registration.title');
     $this->og_meta['og:description'] = trans('seo.front.registration.description');
     $this->og_meta['og:type'] = 'article';
     $this->og_meta['og:url'] = route('registration.index');
     // we get the registration prices
     $prices = $this->repository->where('active', true)->orderBy('price', 'asc')->get();
     // we get the json registration content
     $registration_page = null;
     if (is_file(storage_path('app/registration/content.json'))) {
         $registration_page = json_decode(file_get_contents(storage_path('app/registration/content.json')));
     }
     // we parse the markdown content
     $parsedown = new Parsedown();
     $description = isset($registration_page->description) ? $parsedown->text($registration_page->description) : null;
     // we replace the images aliases by real paths
     $description = ImageManager::replaceLibraryImagesAliasesByRealPath($description);
     // we replace the files aliases by real paths
     $description = FileManager::replaceLibraryFilesAliasesByRealPath($description);
     // prepare data for the view
     $data = ['seo_meta' => $this->seo_meta, 'og_meta' => $this->og_meta, 'prices' => $prices, 'title' => isset($registration_page->title) ? $registration_page->title : null, 'registration_form_file' => isset($registration_page->registration_form_file) ? $registration_page->registration_form_file : null, 'background_image' => isset($registration_page->background_image) ? $registration_page->background_image : null, 'description' => $description, 'css' => elixir('css/app.registration.css')];
     // return the view with data
     return view('pages.front.registration')->with($data);
 }
开发者ID:Okipa,项目名称:una.app,代码行数:33,代码来源:RegistrationController.php

示例3: elixir

 public static function elixir($asset)
 {
     $asset = elixir($asset);
     if (starts_with($asset, '/')) {
         $asset = substr($asset, 1);
     }
     return $asset;
 }
开发者ID:jamesprices,项目名称:iep-printing-php,代码行数:8,代码来源:Resource.php

示例4: assetic

 /**
  * Get the path to a versioned Elixir file or fallback to original file.
  *
  * @param  string  $file
  *
  * @return string
  */
 function assetic($file)
 {
     try {
         return asset(elixir($file));
     } catch (Exception $e) {
         return asset($file);
     }
 }
开发者ID:quetzyg,项目名称:foundation,代码行数:15,代码来源:helpers.php

示例5: renderHttpException

 /**
  * Render the given HttpException.
  *
  * @param  \Symfony\Component\HttpKernel\Exception\HttpException $e
  * @return \Symfony\Component\HttpFoundation\Response
  */
 protected function renderHttpException(HttpException $e)
 {
     // load base JS
     JavaScript::put(['base_url' => url('/'), 'site_name' => config('settings.app_name_' . config('app.locale'))]);
     $seo_meta = ['page_title' => 'Erreur ' . $e->getStatusCode(), 'meta_desc' => $e->getMessage(), 'meta_keywords' => ''];
     $data = ['code' => $e->getStatusCode(), 'seo_meta' => $seo_meta, 'css' => elixir('css/app.error.css')];
     return response()->view('templates.common.errors.errors', $data);
 }
开发者ID:Okipa,项目名称:una.app,代码行数:14,代码来源:Handler.php

示例6: getFullPath

 /**
  * @param $path
  * @return string
  */
 public function getFullPath($path)
 {
     if ($this->use_elixir) {
         $path = rtrim($this->path, '/') . '/' . $path;
         return elixir($path);
     } else {
         return url($path);
     }
 }
开发者ID:xjtuwangke,项目名称:laravel-bundles,代码行数:13,代码来源:Assets.php

示例7: index

 /**
  * login
  *
  * @return $this
  */
 protected function index()
 {
     // SEO settings
     $this->seo_meta['page_title'] = trans('seo.front.login.index.title');
     $this->seo_meta['meta_desc'] = trans('seo.front.login.index.description');
     $this->seo_meta['meta_keywords'] = trans('seo.front.login.index.keywords');
     // data send to the view
     $data = ['seo_meta' => $this->seo_meta, 'css' => elixir('css/app.auth.css')];
     return view('pages.front.login')->with($data);
 }
开发者ID:Okipa,项目名称:una.app,代码行数:15,代码来源:AuthController.php

示例8: createAccount

 /**
  * @return $this
  */
 public function createAccount(Request $request)
 {
     // SEO Meta settings
     $this->seo_meta['page_title'] = trans('seo.front.account.create.title');
     $this->seo_meta['meta_desc'] = trans('seo.front.account.create.description', ['site' => config('settings.app_name_' . config('app.locale'))]);
     $this->seo_meta['meta_keywords'] = trans('seo.front.account.create.keywords');
     // prepare data for the view
     $data = ['seo_meta' => $this->seo_meta, 'email' => $request->get('email'), 'css' => elixir('css/app.auth.css')];
     // return the view with data
     return view('pages.front.account-create')->with($data);
 }
开发者ID:Okipa,项目名称:una.app,代码行数:14,代码来源:AccountController.php

示例9: showEdit

 public function showEdit(Request $request)
 {
     $current_user = ParseUser::getCurrentUser();
     Html\Assets::addLink(Html\Link::Css('/vendor/dropzone/dropzone.css'));
     Html\Assets::addLink(Html\Link::Css(elixir('css/default.css')));
     Html\Assets::addLink(Html\Link::Script('//www.parsecdn.com/js/parse-1.6.7.min.js'));
     Html\Assets::addLink(Html\Link::Script('/vendor/dropzone/dropzone.js'));
     Html\Assets::addLink(Html\Link::Script(elixir('scripts/profileUploader.js')));
     Html\Assets::addMetaTag(Html\Meta::Tag('description', ''));
     $renderData = $this->getRenderData($request);
     $renderData['user'] = $current_user;
     return view('editprofile', $renderData);
 }
开发者ID:samphomsopha,项目名称:codelab,代码行数:13,代码来源:ProfileController.php

示例10: __construct

 public function __construct(Request $request)
 {
     //add default css and site js
     Html\Assets::addLink(Html\Link::Css('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600italic,600,700'));
     Html\Assets::addLink(Html\Link::Css('/vendor/bootstrap/3.3.5/css/bootstrap.min.css'));
     Html\Assets::addLink(Html\Link::Css('/vendor/font-awesome/4.4.0/css/font-awesome.min.css'));
     Html\Assets::addLink(Html\Link::Script('/vendor/jquery/1.11.1/jquery.min.js'));
     Html\Assets::addLink(Html\Link::Script(elixir('scripts/loading.js')));
     Html\Assets::addLink(Html\Link::Script('/vendor/bootstrap/3.3.5/js/bootstrap.min.js'));
     Html\Assets::addLink(Html\Link::Script('/vendor/notifyjs/notify.min.js'));
     Html\Assets::addLink(Html\Link::Script(elixir('scripts/footer.js')));
     Html\Assets::addLink(Html\Link::Script(elixir('scripts/notify.js')));
 }
开发者ID:samphomsopha,项目名称:codelab,代码行数:13,代码来源:SiteController.php

示例11: index

 /**
  * @return $this
  */
 public function index()
 {
     // we get the palmares list
     $palmares = $this->repository->eventsWithResultsSortedByCategory();
     // SEO Meta settings
     $this->seo_meta['page_title'] = 'Palmares';
     $this->seo_meta['meta_desc'] = 'Découvrez le palmares du club Université Nantes Aviron,
     depuis sa création jusqu\'a aujourd\'hui...';
     $this->seo_meta['meta_keywords'] = 'club, université, nantes, aviron, palmares, resultats';
     // prepare data for the view
     $data = ['seo_meta' => $this->seo_meta, 'palmares' => $palmares, 'css' => elixir('css/app.palmares.css')];
     // return the view with data
     return view('pages.front.palmares')->with($data);
 }
开发者ID:Okipa,项目名称:una.app,代码行数:17,代码来源:PalmaresController.php

示例12: index

 /**
  * @return $this
  */
 public function index(Request $request)
 {
     // we get the json content
     $page = null;
     if (is_file(storage_path('app/photos/content.json'))) {
         $page = json_decode(file_get_contents(storage_path('app/photos/content.json')));
     }
     // we parse the markdown content
     $parsedown = new Parsedown();
     $title = isset($page->title) ? $page->title : null;
     $description = isset($page->description) ? $parsedown->text($page->description) : null;
     // SEO Meta settings
     $this->seo_meta['page_title'] = trans('seo.front.photos.title') ? trans('seo.front.photos.title') : $title;
     $this->seo_meta['meta_desc'] = trans('seo.front.photos.description') ? trans('seo.front.photos.description') : str_limit($description, 160);
     $this->seo_meta['meta_keywords'] = trans('seo.front.photos.keywords');
     // og meta settings
     $this->og_meta['og:title'] = trans('seo.front.photos.title') ? trans('seo.front.photos.title') : $title;
     $this->og_meta['og:description'] = trans('seo.front.photos.description') ? trans('seo.front.photos.description') : str_limit($description, 160);
     $this->og_meta['og:type'] = 'article';
     $this->og_meta['og:url'] = route('photos.index');
     if (isset($page->background_image)) {
         $this->og_meta['og:image'] = ImageManager::imagePath(config('image.photos.public_path'), $page->background_image, 'background_image', 767);
     }
     // we sanitize the entries
     $request->replace(InputSanitizer::sanitize($request->all()));
     // we convert the fr date to database format
     if ($request->get('year')) {
         $request->merge(['year' => Carbon::create($request->get('year'))->format('Y')]);
     }
     // we check inputs validity
     $rules = ['year' => 'date_format:Y'];
     // we check the inputs validity
     if (!Validation::check($request->all(), $rules)) {
         return redirect()->back();
     }
     // we get the availables years
     $years = $this->repository->getAvailableYears();
     // we set the year
     if ($request->year) {
         $selected_year = $request->year;
     } else {
         $selected_year = array_first($years);
     }
     // sort results by year
     $photos_list = $this->repository->getModel()->whereBetween('date', [$selected_year . '-01-01', $selected_year . '-12-31'])->where('active', true)->orderBy('date', 'desc')->get();
     // prepare data for the view
     $data = ['seo_meta' => $this->seo_meta, 'og_meta' => $this->og_meta, 'photos_list' => $photos_list, 'title' => isset($page->title) ? $page->title : null, 'background_image' => isset($page->background_image) ? $page->background_image : null, 'description' => $description, 'years' => $years, 'selected_year' => $selected_year, 'css' => elixir('css/app.photos.css'), 'js' => elixir('js/app.photos.js')];
     // return the view with data
     return view('pages.front.photos-list')->with($data);
 }
开发者ID:Okipa,项目名称:una.app,代码行数:53,代码来源:PhotosController.php

示例13: toString

 /**
  * {@inheritdoc}
  */
 public function toString()
 {
     $path = $this->path ?: false;
     if ($path === false) {
         return false;
     }
     if ($this->elixir === true) {
         $path = elixir($path);
     }
     if (in_array(env('APP_ENV'), $this->environments)) {
         return $this->cdn() . $path;
     }
     return $path;
 }
开发者ID:metrique,项目名称:laravel-cdnify,代码行数:17,代码来源:CDNifyRepository.php

示例14: showRegister

 public function showRegister(Request $request)
 {
     Html\Assets::addLink(Html\Link::Css(elixir('css/default.css')));
     Html\Assets::addMetaTag(Html\Meta::Tag('description', ''));
     $renderData = $this->getRenderData($request);
     $redirect_url = $request->getSchemeAndHttpHost() . '/fblogin';
     $permissions = ['email'];
     $fb = new Facebook(['app_id' => config('facebook.app_id'), 'app_secret' => config('facebook.app_secret'), 'default_graph_version' => 'v2.2']);
     $helper = $fb->getRedirectLoginHelper();
     $renderData['msg'] = $request->session()->get('message') ?: '';
     $renderData['activeTab'] = 'signup';
     $renderData['fb_login_url'] = $helper->getLoginUrl($redirect_url, $permissions);
     return view('login', $renderData);
 }
开发者ID:samphomsopha,项目名称:codelab,代码行数:14,代码来源:LoginController.php

示例15: index

 /**
  * @return $this
  */
 public function index()
 {
     // SEO Meta settings
     $this->seo_meta['page_title'] = trans('seo.front.calendar.title');
     $this->seo_meta['meta_desc'] = trans('seo.front.calendar.description');
     $this->seo_meta['meta_keywords'] = trans('seo.front.calendar.keywords');
     // og meta settings
     $this->og_meta['og:title'] = trans('seo.front.calendar.title');
     $this->og_meta['og:description'] = trans('seo.front.calendar.description');
     $this->og_meta['og:type'] = 'article';
     $this->og_meta['og:url'] = route('calendar.index');
     // prepare data for the view
     $data = ['seo_meta' => $this->seo_meta, 'og_meta' => $this->og_meta, 'css' => elixir('css/app.calendar.css')];
     // return the view with data
     return view('pages.front.calendar')->with($data);
 }
开发者ID:Okipa,项目名称:una.app,代码行数:19,代码来源:CalendarController.php


注:本文中的elixir函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。