TALL-forms

Autogenerated and Headless Livewire form components

This is the documentation for Tall-forms v8

Requirements

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