diff --git a/composer.lock b/composer.lock index 378b0f770..fd02a279a 100644 --- a/composer.lock +++ b/composer.lock @@ -8073,16 +8073,16 @@ }, { "name": "spatie/laravel-login-link", - "version": "1.4.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-login-link.git", - "reference": "4190e11ea0b0a31483df23910bdd34b92359050a" + "reference": "c80fb61841bf81ef8d30d8425c55479aaf3d3849" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-login-link/zipball/4190e11ea0b0a31483df23910bdd34b92359050a", - "reference": "4190e11ea0b0a31483df23910bdd34b92359050a", + "url": "https://api.github.com/repos/spatie/laravel-login-link/zipball/c80fb61841bf81ef8d30d8425c55479aaf3d3849", + "reference": "c80fb61841bf81ef8d30d8425c55479aaf3d3849", "shasum": "" }, "require": { @@ -8132,9 +8132,9 @@ "spatie" ], "support": { - "source": "https://github.com/spatie/laravel-login-link/tree/1.4.0" + "source": "https://github.com/spatie/laravel-login-link/tree/1.5.0" }, - "time": "2024-11-07T15:18:12+00:00" + "time": "2024-12-09T10:52:48+00:00" }, { "name": "spatie/laravel-options", diff --git a/config/login-link.php b/config/login-link.php new file mode 100644 index 000000000..c90a05350 --- /dev/null +++ b/config/login-link.php @@ -0,0 +1,50 @@ + ['local'], + + /* + * Login links will only work in these hosts. In all + * other hosts, an exception will be thrown. + */ + 'allowed_hosts' => [env('APP_SERVICE', 'localhost')], + + /* + * The package will automatically create a user model when trying + * to log in a user that doesn't exist. + */ + 'automatically_create_missing_users' => true, + + /* + * The user model that should be logged in. If this is set to `null` + * we'll take a look at the model used for the `users` + * provider in config/auth.php + */ + 'user_model' => null, + + /* + * After a login link is clicked, we'll redirect the user to this route. + * If it is set to `null`, we'll redirect the user to their last intended/requested url. + * You can set it to `/`, for making redirect to the root page. + */ + 'redirect_route_name' => null, + + /* + * The package will register a route that points to this controller. To have fine + * grained control over what happens when a login link is clicked, you can + * override this class. + */ + 'login_link_controller' => LoginLinkController::class, + + /* + * This middleware will be applied on the route + * that logs in a user via a link. + */ + 'middleware' => ['web'], +];