[BUG] Route [voyager.theme.index] not defined.
DerekBuntin opened this issue · 4 comments
Hooks Version: ^1.0
Voyager Version: 1.1.10
Laravel Version: 5.7.24
PHP Version: >=7.1.3
Description:
Themes and redirect hooks give the same error:
Route [voyager.theme.index] not defined.
Steps To Reproduce:
Try and access admin after logging in and the system gives a 500 error message.
NOTE:
Hooks Version: ^1.0
Voyager Version: 1.1
Laravel Version: 5.7.24
PHP Version: >=7.1.3
I have another project on the same local system running earlier versions of voyager and the two hook packages that work with Laravel 5.7.24.
UPDATE:
I updated the working project from Voyager 1.1 to 1.1.10 and this issue appeared.
This conditional logic is what's causing the problem in the register method:
if (request()->is(config('voyager.prefix')) || request()->is(config('voyager.prefix').'/*')) { // }
Once commented out the hook worked with exception to an error being generated when running:
php artisan optimize
Saying that it can't optimize the routes because of the closure being used within the addThemesRouter so I commented out the original and replaced it with the following:
$router->get('themes/options', $namespacePrefix.'ThemesController@index');
I commented out the original:
$router->get('themes/options', function () { return redirect(route('voyager.theme.index')); });
Everything was back up and running as normal after these changes were made.
Hello, I am interested in the voyager theme but i actually want to know that the voyager theme will be suitable for my site http://restaurantfastfood.com/ and how many versions of the voyager themes available so far.
The problem is related to the route cache.
This should fix the problem php artisan route:clear
@predam thank you