Answer the question
In order to leave comments, you need to log in
How to fix UrlGenerationException?
Good day dear programmers. I installed breeze, but when setting it up for myself, I ran into difficulty, I can’t find RouteServiceProvider::HOME and change 'dashboard' to Auth::id()
public function store(LoginRequest $request)
{
$request->authenticate();
$request->session()->regenerate();
//return redirect()->intended(RouteServiceProvider::HOME);
return redirect('/id' . Auth::id());
}
Route::get('/id{id}', function ($id)
{
return view('profile');
})->where('id', '[0-9]+')->middleware(['auth'])->name('dashboard');
<x-slot name="content">
<!-- Authentication -->
<form method="POST" action="{{ route('logout') }}">
@csrf
<x-dropdown-link :href="route('logout')"
onclick="event.preventDefault();
this.closest('form').submit();">
{{ __('Log out') }}
</x-dropdown-link>
</form>
</x-slot>
Illuminate\Routing\Exceptions\UrlGenerationException
Missing required parameter for [Route: dashboard] [URI: id{id}] [Missing parameter: id]. (View: D:\install\OpenServer\domains\laravel8api.local\resources\views\profile.blade.php)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question