mercredi 30 mars 2016

Linking to the route error in laravel 5

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)



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1SwIXjQ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire