80 lines
2.2 KiB
PHP
80 lines
2.2 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources;
|
|
|
|
use App\Filament\Resources\PropertiesResource\Pages;
|
|
use App\Filament\Resources\PropertiesResource\RelationManagers;
|
|
use App\Models\Property;
|
|
use Filament\Forms;
|
|
use Filament\Forms\Form;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Tables;
|
|
use Filament\Tables\Table;
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
|
use Filament\Infolists\Components\TextEntry;
|
|
use Filament\Infolists\Infolist;
|
|
|
|
class PropertiesResource extends Resource
|
|
{
|
|
protected static ?string $model = Property::class;
|
|
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
|
|
|
public static function form(Form $form): Form
|
|
{
|
|
return $form
|
|
->schema([
|
|
//
|
|
]);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return $table
|
|
->columns([
|
|
Tables\Columns\TextColumn::make('property_platform_id')->label('Platform ID')->searchable(),
|
|
Tables\Columns\TextColumn::make('last_found')->label('Last found')->searchable(),
|
|
])
|
|
->filters([
|
|
//
|
|
])
|
|
->actions([
|
|
Tables\Actions\ViewAction::make(),
|
|
])
|
|
->bulkActions([
|
|
Tables\Actions\BulkActionGroup::make([
|
|
Tables\Actions\DeleteBulkAction::make(),
|
|
]),
|
|
]);
|
|
}
|
|
|
|
public static function infolist(Infolist $infolist): Infolist
|
|
{
|
|
return $infolist
|
|
->schema([
|
|
TextEntry::make('property_platform_id'),
|
|
TextEntry::make('last_found')
|
|
->dateTime(),
|
|
])
|
|
->columns(1)
|
|
->inlineLabel();
|
|
}
|
|
|
|
public static function getRelations(): array
|
|
{
|
|
return [
|
|
//RelationManagers\ExtractionsRelationManager::class,
|
|
];
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => Pages\ListProperties::route('/'),
|
|
//'create' => Pages\CreateProperties::route('/create'),
|
|
'view' => Pages\ViewProperties::route('/{record}'),
|
|
//'edit' => Pages\EditProperties::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|