protected final function getForm($action)
 {
     switch ($action) {
         case 'create':
             return $this->form(FormBuilder::make(['route' => $this->routeName('store'), 'method' => 'PUT']));
         case 'update':
             return $this->form(FormBuilder::make(['route' => $this->routeName('update'), 'method' => 'PUT']));
         default:
         case 'delete':
             return null;
     }
 }
Exemple #2
0
 function __call($fn, $args)
 {
     $name = $args[0];
     $this->fields[$name] = \FormBuilder::field($this, $name, $fn);
     return $this->fields[$name];
 }