TALL-forms
Autogenerated and Headless Livewire form components
Requirements
Autogenerated or Headless
<?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?