Kate
Feb 27, 2024
Authentication w/ existing Laravel app
Hi,
installed Laravel and Waterhole fluently, but stuck on the last part.
Where exactly do I have to add this piece of code. Add the following to "a Service Provider". I know where Service Providers are but don't use them
Extend\ForumRoutes::add(function () {
Route::name('login')->get(
'login',
fn() => redirect()
->setIntendedUrl(url()->previous())
->route('login'),
);
});
When i add it to boot in the AppServiceProvider i get an error
Illuminate\Routing\Route::name() cannot be called statically