Refactor Filament resources and models; add attribute casting in Group model, update navigation icons, and remove TeacherSeeder in favor of UserTableSeeder.
This commit is contained in:
@@ -14,11 +14,6 @@ class GroupsTable
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('leaderTeacher.name')
|
||||
->label('Topar başy')
|
||||
->searchable()
|
||||
->sortable(),
|
||||
|
||||
TextColumn::make('start_date')
|
||||
->label('Başlanýan senesi')
|
||||
->date()
|
||||
@@ -29,6 +24,11 @@ class GroupsTable
|
||||
->date()
|
||||
->sortable(),
|
||||
|
||||
TextColumn::make('leaderTeacher.name')
|
||||
->label('Topar başy')
|
||||
->searchable()
|
||||
->sortable(),
|
||||
|
||||
TextColumn::make('created_at')
|
||||
->dateTime()
|
||||
->sortable()
|
||||
|
||||
@@ -13,20 +13,24 @@ use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class PilgrimResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Pilgrim::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;
|
||||
|
||||
protected static ?string $navigationLabel = 'Zyýaratçylar';
|
||||
|
||||
protected static ?string $pluralLabel = 'Zyýaratçylar';
|
||||
|
||||
protected static ?int $navigationSort = 2;
|
||||
|
||||
public static function getNavigationIcon(): string | BackedEnum | Htmlable | null
|
||||
{
|
||||
return 'icon-pilgrim-man';
|
||||
}
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return PilgrimForm::configure($schema);
|
||||
|
||||
Reference in New Issue
Block a user