skip to Main Content

First question

I am currently learning PHP-Fiament and I can not figure out how to disable the default-dashboard.

My other question is:
Why isnt the Stack below centered?

public static function table(Table $table): Table
    {
        return $table
            ->columns([
                Split::make([
                    TextColumn::make('lastname')
                        ->sortable()
                        ->searchable()
                        ->placeholder('none')
                        ->label(__('messages.lastname')),
                    Stack::make([
                        TextColumn::make('phone_number')
                            ->sortable()
                            ->searchable()
                            ->placeholder('none')
                            ->label(__('messages.phone_number'))
                            ->url(fn($record) => "tel:{$record->phone_number}")
                            ->icon('fas-phone-volume'),
                        TextColumn::make('email')
                            ->sortable()
                            ->searchable()
                            ->placeholder('none')
                            ->label(__('messages.email'))
                            ->url(fn($record) => "mailto:{$record->email}")
                            ->icon('fas-envelope')
                    ])->alignCenter()
                ])
            ])
            ->filters([
                //
            ])
            ->actions([
                EditAction::make(),
                TablesActionsAction::make('Details')->button() //->url(route(''))
            ])
            ->bulkActions([
                TablesActionsDeleteBulkAction::make(),
            ]);
    }

I have tried to look it up but I have found nothing interesting.

2

Answers


  1. In config/filament.php, you should see something like this:

    'pages' => [
        'namespace' => 'App\Filament\Pages',
        'path' => app_path('Filament/Pages'),
        'register' => [
            PagesDashboard::class,
        ],
    ],
    

    Comment out or remove that PagesDashboard::class line.

    Login or Signup to reply.
  2. see the documentation: https://filamentphp.com/docs/3.x/panels/installation

    php artisan filament:install –panels

    This will create and register a new Laravel service provider called app/Providers/Filament/AdminPanelProvider.php.

    In this file, you must comment the relevant line:

    ->pages([
                // PagesDashboard::class,
            ])
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search