Route [paslon.create] not defined.
<a href="{{route('daftar.create')}}" class="btn btn-primary btn-sm mb-3">tambah1</a>
controller
public function create()
{
return view('daftar.create');
}
web.php
Route::get('/create', function () { return view('/daftar/create'); });
my solution is changing in <a href="/create" class="btn btn-primary btn-sm mb-3">tambah1</a>
and in web Route::get('/create', function () { return view('daftar.create'); });
but I don’t know if it will be safe or not
2
Answers
You’re calling route with name and for that you have to define name first in the
routes/web.php
For more better understanding checkout the documentation:
https://laravel.com/docs/10.x/routing#named-routes
By default your routes doesn’t have any name, you can see it typing in console:
You will see route names.
You need to declare name yourself