當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FormBuilder::setSessionStore方法代碼示例

本文整理匯總了PHP中Collective\Html\FormBuilder::setSessionStore方法的典型用法代碼示例。如果您正苦於以下問題:PHP FormBuilder::setSessionStore方法的具體用法?PHP FormBuilder::setSessionStore怎麽用?PHP FormBuilder::setSessionStore使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Collective\Html\FormBuilder的用法示例。


在下文中一共展示了FormBuilder::setSessionStore方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: registerFormBuilder

 /**
  * Register the form builder instance.
  *
  * @return void
  */
 protected function registerFormBuilder()
 {
     $this->app->singleton('form', function ($app) {
         $form = new FormBuilder($app['html'], $app['url'], $app['view'], $app['session.store']->getToken());
         return $form->setSessionStore($app['session.store']);
     });
 }
開發者ID:abordin,項目名稱:html,代碼行數:12,代碼來源:HtmlServiceProvider.php

示例2: register

 /**
  * Register the application services.
  */
 public function register()
 {
     $this->mergeConfigFrom(__DIR__ . '/config/config.php', 'laform');
     $this->app->bind('laform', 'Karan\\Laform\\Laform');
     if (!$this->app->offsetExists('form')) {
         $this->app->singleton('form', function ($app) {
             // LaravelCollective\HtmlBuilder 5.2 is not backward compatible and will throw an exeption
             // https://github.com/kristijanhusak/laravel-form-builder/commit/a36c4b9fbc2047e81a79ac8950d734e37cd7bfb0
             if (substr(Application::VERSION, 0, 3) == '5.2') {
                 $form = new LaravelForm($app['html'], $app['url'], $app['view'], $app['session.store']->getToken());
             } else {
                 $form = new LaravelForm($app['html'], $app['url'], $app['session.store']->getToken());
             }
             return $form->setSessionStore($app['session.store']);
         });
         if (!$this->aliasExists('Form')) {
             AliasLoader::getInstance()->alias('Form', 'Collective\\Html\\FormFacade');
         }
     }
     if (!$this->app->offsetExists('html')) {
         $this->app->singleton('html', function ($app) {
             return new HtmlBuilder($app['url'], $app['view']);
         });
         if (!$this->aliasExists('Html')) {
             AliasLoader::getInstance()->alias('Html', 'Collective\\Html\\HtmlFacade');
         }
     }
 }
開發者ID:karanjilka,項目名稱:laform,代碼行數:31,代碼來源:LaformServiceProvider.php

示例3: registerFormBuilder

 /**
  * Register the form builder instance.
  *
  * @return void
  */
 protected function registerFormBuilder()
 {
     $this->app->singleton('form', function ($app) {
         /** @var Store $session */
         $session = $app['session.store'];
         $form = new FormBuilder($app['html'], $app['url'], $session->token());
         $form->setSessionStore($session);
         return $form;
     });
     $this->app->alias('form', 'Collective\\Html\\FormBuilder');
 }
開發者ID:vluzrmos,項目名稱:collective-html,代碼行數:16,代碼來源:HtmlServiceProvider.php

示例4: registerFormIfHeeded

 /**
  * Add Laravel Form to container if not already set
  */
 private function registerFormIfHeeded()
 {
     if (!$this->app->offsetExists('form')) {
         $this->app->singleton('form', function ($app) {
             $form = new LaravelForm($app['html'], $app['url'], $app['view'], $app['session.store']->getToken());
             return $form->setSessionStore($app['session.store']);
         });
         if (!$this->aliasExists('Form')) {
             AliasLoader::getInstance()->alias('Form', 'Collective\\Html\\FormFacade');
         }
     }
 }
開發者ID:seydu,項目名稱:laravel-form-builder,代碼行數:15,代碼來源:FormBuilderServiceProvider.php

示例5: setSessionStore

 /**
  * Set the session store implementation.
  *
  * @param \Illuminate\Session\Store $session
  * @return $this 
  * @static 
  */
 public static function setSessionStore($session)
 {
     return \Collective\Html\FormBuilder::setSessionStore($session);
 }
開發者ID:alvarobfdev,項目名稱:BaseCRUDproject,代碼行數:11,代碼來源:_ide_helper.php


注:本文中的Collective\Html\FormBuilder::setSessionStore方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。