jeudi 19 janvier 2017

Laravel route not defined but it clearly is

I keep getting the following error in Laravel 5.3:

Route [clients] not defined. (View: /srv/users/serverpilot/apps/project-sytem/resources/views/partials/sidebar.blade.php) (View: /srv/users/serverpilot/apps/project-sytem/resources/views/partials/sidebar.blade.php) (View: /srv/users/serverpilot/apps/project-sytem/resources/views/partials/sidebar.blade.php)

Here is my routes file:

Route::group(['middleware' => 'auth'], function () {
    Route::get('/', 'ProjectController@index')->name('projects');
    Route::get('/projects', 'ProjectController@index')->name('projects');
    Route::resource('projects', 'ProjectController');


    Route::get('/clients', 'ClientController@index')->name('clients');
    Route::resource('clients', 'ClientController');

});


Auth::routes();

Route::get('/home', 'HomeController@index');

In my sidebar.blade.php I have links to my routes like this:

<li>
   <a href=""><i class="fa fa-archive" aria-hidden="true"></i> Projects</a>
</li>
<li>
   <a href=""><i class="fa fa-users" aria-hidden="true"></i>Clients</a>
</li>

I don't see where I'm going wrong, my projects route works just fine and I've done it the exact same way. Any ideas what's going wrong with my clients route?



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

Aucun commentaire:

Enregistrer un commentaire