Exemplo n.º 1
0
 /**
  * Register the form builder instance.
  *
  * @return void
  */
 protected function registerFormBuilder()
 {
     $this->app->bindShared('form', function ($app) {
         $form = new FormBuilder($app['html'], $app['url'], $app['session.store']->getToken());
         return $form->setSessionStore($app['session.store']);
     });
 }
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->app->singleton('form', function ($app) {
         $form = new FormBuilder($app['html'], $app['url'], $app['session.store']->getToken());
         return $form->setSessionStore($app['session.store']);
     });
     $this->app->singleton('html', function ($app) {
         return new HtmlBuilder($app['url']);
     });
 }
 /**
  * Add Laravel Form to container if not already set
  */
 private function registerFormIfHeeded()
 {
     if (!$this->app->offsetExists('form')) {
         $this->app->bindShared('form', function ($app) {
             $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', 'Illuminate\\Html\\FormFacade');
         }
     }
 }
Exemplo n.º 4
0
 /**
  * Set the session store implementation.
  *
  * @param \Illuminate\Session\Store $session
  * @return $this 
  * @static 
  */
 public static function setSessionStore($session)
 {
     return \Illuminate\Html\FormBuilder::setSessionStore($session);
 }