timolake/livewire-forms

one form for creating & updating data, based on laravel livewire
3,136
Install
composer require timolake/livewire-forms
Latest Version:3.1.0
PHP:^8.1
License:MIT
Last Updated:Apr 7, 2026
Links: GitHub  ·  Packagist
Maintainer: timolake

livewire-forms

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

one form for creating & updating data, based on laravel livewire

Installation

You can install the package via composer:

composer require timolake/livewire-forms

How to use

  1. create class in \App\Http\Livewire\Forms and extend form timolake\LivewireForm or timolake\LivewireItemForm
  2. implement abstact classes
    populate rules() with all attributes wich need to be edited
    use model.attribute notation
  3. create view

validation

for model validation always use model.attribute

    public function rules(): array
    {
        return [
            'model.name' => 'required|min:2|max:255',
        ];
    }

for item validation, use model.items and selectedItem.attribute

   public function rules(): array
   {
       return [
           'items' => 'required|min:1',
       ];
   }

   public function itemRules(): array
   {
       return [
           'selectedItem.foreign_key' => 'required|numeric',
           'selectedItem.name' => 'required|min:2|max:255',
       ];    
   }

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.

Related Packages

wobeto/twitter

Laravel 4 Service Provider to interact with twitter account, like return a colle...

135 1
andhikamaheva/date

A date library to help you work with dates in different languages

13 1
vlados/laravel-blade-crawler-detect

Boost Lighthouse and PageSpeed scores by hiding cookie banners, chat widgets and...

5,439 0
maystro/filament-popup-modal

A comprehensive modal dialog system for FilamentPHP with progress bars, callback...

7 1