Julien B. (aka yebor974)
Filament::auth()->login($user), multiple guards
Maybe this article cans help you : https://filamentmastery.com/articles/implementing-filament-auth-guard
For testing i init panel in TestCase with :
Filament::setCurrentPanel(
Filament::getPanel(FilamentPanelEnum::BACKEND->value)
);
And acting as
with :
$this->actingAs($member, Filament::getAuthGuard());
When you manage policy you can check permission like this if you use spatie permissions package:
public function viewAny(User $user): bool
{
return $user->hasPermissionTo('view-any broker', filament()->getAuthGuard());
}
5 replies
How to create form with Filament styles outside the panel?
I wrote an article on using Filament outside of panels if that can help you https://filamentmastery.com/articles/guide-to-using-filament-components-in-public-facing-pages
You can next use form in a livewire component
7 replies
Add Elements to the TopMenu
yes, same example here : https://filamentmastery.com/articles/filament-render-hooks-example-with-authentication-pages#multiple-panels
9 replies
Add Elements to the TopMenu
Hi,
You can use render hook TOPBAR_START
Example here with AUTH_REGISTER_FORM_BEFORE : https://filamentmastery.com/articles/filament-render-hooks-example-with-authentication-pages
9 replies
Filament Auth via an external api
You can register or subscribe to https://filamentmastery.com to discover other tutorials. All it’s free
7 replies
Filament Auth via an external api
And for custom user provider : https://laravel.com/docs/11.x/authentication#adding-custom-user-providers
7 replies
Filament Auth via an external api
Hi,
It’s possible by defining custom guard and user provider. To map your guard you can follow this article : https://filamentmastery.com/articles/implementing-filament-auth-guard
7 replies
Custom Login Page(add link below the sign in button)
Hi,
You can use render hook
AUTH_LOGIN_FORM_AFTER
Example here with AUTH_REGISTER_FORM_BEFORE
: https://filamentmastery.com/articles/filament-render-hooks-example-with-authentication-pages8 replies
Listener on verification
Hi. You have the default event from laravel
Illuminate\Auth\Events\Verified
.
Just create an event listener for this event and add your process in handle methode.
Example :
For listener, look at this documentation : https://laravel.com/docs/11.x/events#defining-listeners3 replies