Custom Login Page(add link below the sign in button)
Is there a way to add a link below the sign in button? Right now it is displaying on top of the sigin in button.
<?php
namespace App\Filament\Auth;
use Filament\Forms\Form;
use Filament\Forms\Components\View;
use Filament\Pages\Auth\Login as BaseLogin;
class Login extends BaseLogin
{
public function form(Form $form): Form
{
return $form->schema([
$this->getEmailFormComponent(),
$this->getPasswordFormComponent(),
View::make('auth.eula-link'), ]); } }
View::make('auth.eula-link'), ]); } }
6 Replies
up need help
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-pagesFilament Mastery
Filament Render Hooks: example with authentication pages - Filament...
Learn how to customize Filament panels using Render Hooks. Discover the power of clean and maintainable customizations in Filament!
I tried this and it's not working do you have other way to do this?
I have no other way to do this than to redefine the login view but this is not recommended. What version of Filament are you using?
use Filament\Support\Facades\FilamentView;
use Filament\View\PanelsRenderHook;
use Illuminate\Contracts\View\View;
you can write this code inside boot() function inside your AppServiceProvider
FilamentView::registerRenderHook(
PanelsRenderHook::AUTH_LOGIN_FORM_AFTER,
fn(): View => view('socialite-logins'),
);
Just add it to the panel provider: