Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blank page for any new route in Laravel

Tags:

laravel-5

I am using Laravel 5.0 and been developing on this project for months without any problems. I just added a new route with a new method in the controller. But whatever I do, all these new entries in the routes.php file show me a blank page.

In my routes.php:

Route::get('dashboard/product_categories/testing', 'ProductCategoriesController@testing');

In the ProductCategoriesController.php:

public function testing() {
    die('Hello world!');
}

This happens to all new entries in the routes.php. No matter what controller its pointed to.

I do not use route:cache so am clueless where this problem stems from

Please note: This is an unchanged project. The httpd server is running as it should and the storage folders have read/write permissions

like image 730
Alvin Bakker Avatar asked Oct 17 '25 09:10

Alvin Bakker


2 Answers

If you have a resource controller for the dashboard try to add the new routes before the resource.

like image 185
Belahcel Yanis Avatar answered Oct 19 '25 10:10

Belahcel Yanis


I totally forgot about this question, but I found the solution: php artisan route:clear

like image 29
Alvin Bakker Avatar answered Oct 19 '25 09:10

Alvin Bakker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!