BeforeLoginFieldsEvent
BeforeLoginFieldsEvent is dispatched on the sign-in page before the login form fields are rendered. Modules can use it to add notices, additional markup, or helper UI above the default login form.
Where It Runs
This event is implemented in resources/views/pages/auth/sign-in.blade.php and is dispatched with Output::dispatch() before /common/auth/sign-in-form is included.
Available Properties
$event->output: anApp\\Classes\\Outputinstance used to append rendered content withaddView()or related output methods.
Listener Example
<?php
namespace Modules\MyModule\Listeners;
use App\Events\BeforeLoginFieldsEvent;
class BeforeLoginFieldsEventListener
{
public function handle( BeforeLoginFieldsEvent $event )
{
$event->output->addView( 'MyModule::auth.before-login-fields' );
}
}
Summary
- Use this event when a module needs to inject content at this exact form position.
- Append module views with
$event->output->addView().