Refactor GroupResource to use a static property for navigation icon; add method documentation for name attribute in Group model.
This commit is contained in:
33
app/Filament/Resources/Rooms/Tables/RoomsTable.php
Normal file
33
app/Filament/Resources/Rooms/Tables/RoomsTable.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Rooms\Tables;
|
||||
|
||||
use Filament\Tables;
|
||||
|
||||
class RoomsTable
|
||||
{
|
||||
public static function schema(): array
|
||||
{
|
||||
return [
|
||||
Tables\Columns\TextColumn::make('hotel.name')
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('name')
|
||||
->searchable(),
|
||||
Tables\Columns\TextColumn::make('floor')
|
||||
->searchable(),
|
||||
Tables\Columns\TextColumn::make('bed_count')
|
||||
->numeric()
|
||||
->sortable(),
|
||||
Tables\Columns\IconColumn::make('wide')
|
||||
->boolean(),
|
||||
Tables\Columns\TextColumn::make('created_at')
|
||||
->dateTime()
|
||||
->sortable()
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
Tables\Columns\TextColumn::make('updated_at')
|
||||
->dateTime()
|
||||
->sortable()
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user