The package behavior is controlled via a configuration file published during installation. You can customize the model, expiration, authentication guard, and more.
Key configuration options include:
model: The class for the magic login model (default: Maize\MagicLogin\Models\MagicLogin::class).expiration: Minutes before the link expires (default: 120).guard: The authentication guard to use (default: 'web').redirect_url: The default URL to redirect to after successful login.force_single: If true, generating a new link revokes all previous links for that user (default: true).logins_limit: How many times a single link can be used. -1 allows indefinite use (default: -1).send_notification_action: Custom action class for sending the email.notification: Custom notification class.
Route settings can also be customized under the route key, including methods, uri, name, controller, and middleware.
return [
'model' => null,
'expiration' => null,
'guard' => null,
'redirect_url' => null,
'exception' => null,
'force_single' => null,
'logins_limit' => null,
'send_notification_action' => null,
'notification' => null,
'route' => [
'methods' => null,
'uri' => null,
'name' => null,
'controller' => null,
'middleware' => null,
],
];