Support the ongoing development of Laravel.io →
Requests
Last updated 2 years ago.
0

Try this one:

<?php
Route::group(['middleware' => ['web']], function () {
 
 Route::get('/', function () {
    return 'hi';
  });

});
0

So your answer, is just to paste the same thing with 1 extra new line in it?

0

try one character change

Route::get('/foo', function () {

0

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...

Last updated 8 years ago.
0

Try changing this part.

Route::group(['middleware' => 'web'],

0
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..

Last updated 8 years ago.
0

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

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.