TALL-forms
Autogenerated and Headless Livewire form components
This is the documentation for Tall-forms v8
Requirements
Php ^8.0|^8.1
Laravel ^8.75.0
Livewire ^2.8.1
Alpine ^3.5.1
Tailwind 2.x or 3.x
Autogenerated or Headless
(Extend TallFormComponent)
In a standard TallFormComponent. You don't need to add properties, render(), $rules or create a blade view.
<?php
namespace App\Http\Livewire\Forms;
use App\Models\Post;
use Tanthammar\TallForms\Input;
use Tanthammar\TallForms\Textarea;
use Tanthammar\TallForms\TallFormComponent;
class PostForm extends TallFormComponent
{
public function mount(Post $post): void
{
$this->mount_form($post);
}
protected function fields(): array
{
return [
Input::make('Title')->rules('required|string|min:6'),
Textarea::make('Content')->rules('required|string|max:500')
];
}
}
No view needed
Last updated
Was this helpful?