F
Filamentβ€’16mo ago
Yuut4

hide topbar and sidebar in admin panel on a custom page, when I open it in a custom route

I created a custom page in filament, and a route for the same one, and I didnt want to de admin panel to show
23 Replies
Yuut4
Yuut4OPβ€’16mo ago
my route =
Route::get('/qwerty', CustomAttendancePage::class);
Route::get('/qwerty', CustomAttendancePage::class);
and this has livewire component
Yuut4
Yuut4OPβ€’16mo ago
I just wanted what is inside the red rectangle to appear
Yuut4
Yuut4OPβ€’16mo ago
it's possible ?
Patrick Boivin
Patrick Boivinβ€’16mo ago
You can customize the layout of your custom page as well as the view:
class MyPage extends Page
{
protected static string $layout = 'filament.layouts.my-simple-layout';

protected static string $view = 'filament.pages.my-page';
}
class MyPage extends Page
{
protected static string $layout = 'filament.layouts.my-simple-layout';

protected static string $view = 'filament.pages.my-page';
}
Yuut4
Yuut4OPβ€’16mo ago
I tried that but, my style is all unformatted is this normal? since I used tailwind ?
Yuut4
Yuut4OPβ€’16mo ago
stay like this
Saade
Saadeβ€’16mo ago
how's your blade file looks like?
Yuut4
Yuut4OPβ€’16mo ago
if I use the custom page on the filament it looks like this
Yuut4
Yuut4OPβ€’16mo ago
but if I use a route it's like this
Saade
Saadeβ€’16mo ago
i know, i want to see the contents of your file
Patrick Boivin
Patrick Boivinβ€’16mo ago
@yuut4 Copy the built-in layout and start from that. Make sure to remove only what you don't need https://github.com/filamentphp/filament/blob/2.x/packages/admin/resources/views/components/layouts/app.blade.php
GitHub
filament/packages/admin/resources/views/components/layouts/app.blad...
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS. - filamentphp/filament
Yuut4
Yuut4OPβ€’16mo ago
Oh ok ok ths i will try
Yuut4
Yuut4OPβ€’16mo ago
I used livewire to do it too but the livewire blade is of this type
Saade
Saadeβ€’16mo ago
set $layout = 'filament::components.layouts.base'
Yuut4
Yuut4OPβ€’16mo ago
will make the route again and try it out
Yuut4
Yuut4OPβ€’16mo ago
it worked, it needs some adjustments
Yuut4
Yuut4OPβ€’16mo ago
can i rewrite? right
Saade
Saadeβ€’16mo ago
just make the necessary adjustments, since filament::components.layouts.app was doing that for you
Yuut4
Yuut4OPβ€’16mo ago
ofc, I just want to put more towards the center of the page and I hadk is just fine
Saade
Saadeβ€’16mo ago
class = container mx-auto
Yuut4
Yuut4OPβ€’16mo ago
that works, always looking for new things thanks for the help
Saade
Saadeβ€’16mo ago
Please mark the post as solved πŸ™‚
Yuut4
Yuut4OPβ€’16mo ago
I will
Want results from more Discord servers?
Add your server