I have this route:
Route::resource('users', 'UserController');
Route::get('/users/create', 'UserController@create');
and the controller function is:
public function index()
{
$users=User::all();
return View('users.index',compact('users'));
}
And i have this code in index.blade.php
where shows the error:
<p>{{ link_to_route('users.create', 'Add new user') }}</p>
the error message is:
Route [users.create] not defined. (View: C:\xampp\htdocs\larapro\resources\views\users\index.blade.php)
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire