<?php
namespace App\Filament\Resources;
use App\Filament\Resources\MessageResource\Pages;
use App\Models\Message;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;
class MessageResource extends Resource
{
protected static ?string $model = Message::class;
protected static ?string $navigationIcon = 'heroicon-o-book-open';
public static function form(Form $form): Form
{
return $form
->schema([
//
]);
}
public static function table(Table $table): Table
{
return $table
->columns([
//
])
->filters([
//
])
->actions([
Tables\Actions\ViewAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
]),
])
->emptyStateActions([
Tables\Actions\CreateAction::make(),
]);
}
public static function getRelations(): array
{
return [
//
];
}
public static function getPages(): array
{
return [
'index' => Pages\ListMessages::route('/'),
'view' => Pages\ViewMessage::route('/{record}'),
'create' => Pages\CreateMessage::route('/create'),
'edit' => Pages\EditMessage::route('/{record}/edit'),
];
}
}