garygreen / pretty-routes

Pretty routes for Laravel
655 stars 77 forks source link

Class Auth\LoginController does not exist #34

Open Braunson opened 6 years ago

Braunson commented 6 years ago

Receiving this error when trying to view the pretty-routes view.

Class Auth\LoginController does not exist (View: /home/vagrant/project/vendor/garygreen/pretty-routes/views/routes.blade.php)

Tracks back to this file views/routes.blade.php in this package:

<?php echo e(implode(', ', array_map($middlewareClosure, array_merge($route->middleware(), $route->controllerMiddleware())))); ?>

Seems to be caused by a group having middleware applied to it.

For example:

Route::prefix('submit')->middleware('auth')->group(function () {
    Route::get('/', 'SubmitController@showSubmit')->name('submit');
});

Running Laravel 5.5.24, fresh install of this package.

andrey-helldar commented 4 years ago

I understand that the question in this thread is very old and, apparently, Gary is busy with the main work, so I released my version from the fork as self-contained package. It's easier to look at a package than to talk about its changes: https://github.com/andrey-helldar/pretty-routes