Exemplo n.º 1
0
 /**
  * Overwrite the form builder binding.
  *
  * @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']);
     });
 }
Exemplo n.º 2
0
 protected function makeFormBuilder($model = null)
 {
     $urlGenerator = new UrlGenerator(new RouteCollection(), Request::create('/foo', 'GET'));
     $htmlBuilder = new HtmlBuilder($urlGenerator);
     $formBuilder = new FormBuilder($htmlBuilder, $urlGenerator, '');
     if ($model) {
         $formBuilder->setModel($model);
     }
     return $formBuilder;
 }