Пример #1
0
 /**
  * Handle the form fields.
  *
  * @param Guard           $auth
  * @param PostFormBuilder $builder
  */
 public function handle(Guard $auth, PostFormBuilder $builder)
 {
     $builder->setFields(['*', 'author' => ['config' => ['default_value' => $auth->id()]], 'publish_at' => ['config' => ['default_value' => 'now']]]);
 }