is_admin
sorry for asking this type of question again but I want that is in my user's column is_admin to be boolean and if is admin = 1 then I can access the admin panel other this will say in the form you don't have access to login or you are not an admin. I do not want to show them (given image ) how can i archive this type of functionality in filamentphp v3
9 Replies
You can implement a Laravel 403 exception catch to redirect to wherever, pretty sure on access filament, instead of checking just pass in a return if it's false.
thanks sir but can i change the login panel data like error message "you are not an admin"
because then i got 403 after that i am not able to go back and as well as can not go to login page can i rediect to login page with "you are a not admin message " insted of 403
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
thank you sir
i can also show normal user to a new panel ? which will be blank .
you can create different panels
sir how can we redirect them back to login page is he is not a user and show error or message that you are not an admin ?
Just override the login page class and build a validation message in instead.
hum, maybe you can customize the login page and edit what you want
$panel->login(CustomLogin::class)
You can extend the default login class and edit what you needthank you so much sir.