Skip to content

v4.0.0

Compare
Choose a tag to compare
@aerni aerni released this 14 Jun 08:46
· 62 commits to main since this release
adcb25a

What's new

  • Adds the ability to autoload custom components by form handle. Example: {{ livewire:form handle="contact" }} will load App\Http\Livewire\ContactForm.php if it exists. (#18)

Upgrade Guide

Required

  • Make sure your custom components extend Aerni\LivewireForms\Http\Livewire\BaseForm

Optional

The following changes are only necessary if you want to use the new autoloading capabilities.

  • Ensure your custom components end with Form, e.g. rename Contact to ContactForm.
  • Change your template to use the default form component, e.g. use {{ livewire:form handle="contact" }} instead of {{ livewire:contact }}.
  • You can safely remove the public string $handle property from your component.
  • If you've set the $view and $theme property, exchange them with protected static $VIEW and protected static $THEME.