当前位置: 首页>>代码示例>>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;未经允许,请勿转载。