Filament

Full Guide Building Application Using Laravel and Filament

Create a resource:

php artisan make:filament-resource <ResourceName>

This will create files in app/Filament/Resources

Your new resource class lives in NameResource.php

php artisan make:filament-resource Customer --generate

->required()

Form

Code

Simple text input

TextInput::make('name')

use Filament\Forms\Components\TextInput;

Select / Option

Select::make('status') ->options([ 'draft' => 'Draft', 'reviewing' => 'Reviewing', 'published' => 'Published', ])

use Filament\Forms\Components\Select;

Toggle button

Toggle::make('is_admin')

use Filament\Forms\Components\Toggle;

Markdown Editor

MarkdownEditor::make('content')

use Filament\Forms\Components\MarkdownEditor;

Table

Last updated