Try this one:
<?php
Route::group(['middleware' => ['web']], function () {
Route::get('/', function () {
return 'hi';
});
});
So your answer, is just to paste the same thing with 1 extra new line in it?
I've tried both the solutions proposed and for the first one I've accessed blog.loc/ and didnt work, later I've implemented the second solutions and accessed /foo ending with no luck...
Try changing this part.
Route::group(['middleware' => 'web'],
use App\Addressbook;
use Illuminate\Http\Request;
Route::group(['middleware' => 'web'], function () {
Route::get('/test', function () {
return 'hi';
});
});
This is how my route.php looks like now, but on accessing blog.loc/test is still giving me WSOD.. I've tried auth middleware and it is working me, on accessing the url it is redirecting to login page. Have no idea why it is not working for web middleware..
incase someone came across this, in the latest update the middleware was removed from the routes.php which used to be and now its made the default in RouteServiceProvider.php so thats why when u apply it it doesnt work.
check https://laravel.com/docs/5.2/middleware#middleware-groups
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community