Fly.io can build and run your Laravel apps globally. Deploy your https://fly.io/docs/laravel/ on Fly.io, you’ll be up and running in minutes!

Instead of jamming form “stuff” into our Livewire component, we can create a new Form object: php artisan livewire:form SnackRequestForm

Then, in our component, we can use that form: namespace App\Livewire; use Livewire\Component; use App\Models\SnackRequest; use App\Livewire\Forms\SnackRequestForm; class SnackRequest extends Component { public SnackRequestForm $form; public function save() { SnackRequest::create( $this->form->all()); return $this->redirect('/requests'); } public function render() { return view('livewire.request-snack'); }}

The component: public function save() { + $this->form->submit(); - SnackRequest::create( - $this->form->all() - ); return $this->redirect('/requests'); }
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners