timolake/livewire-forms

one form for creating & updating data, based on laravel livewire
3,228
Install
composer require timolake/livewire-forms
Latest Version:3.1.0
PHP:^8.1
Laravel:10 – 13
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

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

641,106,524 9,700
laravel/framework

The Laravel Framework.

593,882,149 34,959
laravel/tinker

Powerful REPL for the Laravel framework.

502,645,077 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

418,291,778 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

394,964,158 4,660

Version History

Version Released PHP Laravel License
3.1.0 ^8.1 ~10|~11|~12.0|~13.0 MIT
3.0.0 ^8.1 ~10|~11|~12.0 MIT
2.2.0 ^8.1 ~10|~11|~12.0 MIT
2.1.2 ^8.1 ~10|~11 MIT
2.1.1 ^8.1 ~10|~11 MIT