When starting the server with the php artisan serve command, it starts correctly but when going to the browser it shows nothing more than two brackets: " [] " as seen in the image. https://isstatic.aoverflow.com/zWfQf.png
Then if in the url I add /login or some other url of some route, it enters correctly. From one day to the other this problem appeared.
My web.php routes file:
//Pantalla Principal==============================
Route::get('/', function () {
return view('welcome');
});
//================================================
//Autenticacion===================================
Auth::routes();
//================================================
//ADMIN panel=====================================
Route::get('/home',function(){
return view('admin.layout');
});
somewhere you have a
Try going from your routes file -> middlewares -> Controllers -> (if applicable) -> strategies -> Repositories -> views.
The safest thing is that you have inside the dd function an empty array.
By the way, to debug code it is bad practice to use them.
If you have not changed anything in the middleware, nor have you changed the route of the views, try refreshing the content of the following resources:
From your work environment open a terminal and type the following commands
1) Clear the cache
2) Clean the routes
3) Clean the configuration file
4) Clean views
I already found the error, a line of the routes did not have a URL assigned:
I changed it to:
And everything worked fine!