laravel-form-builder: Laravel 5.2.32 or greater breaks form

When updating to Laravel 5.2.32 or greater, I get the following error when trying to display a form with a button. Removing the button works.

Relationship method must return an object of type lluminate\Database\Eloquent\Relations\Relation

/* EditMediaForm.php */

public function buildForm()
{
     $this->add('filename', 'text')
         ->add('alt_attribute', 'text')
         ->add('save', 'submit', ['attr' => ['class' => 'btn btn-primary']]);
}

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 23 (11 by maintainers)

Commits related to this issue

Most upvoted comments

@csogilvie i fixed it, thanks.