Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not found page in Lumen after install [duplicate]

I just installed Lumen but when I head to its public directory localhost/lumen/public,

Sorry, the page you are looking for could not be found.

will appear.

I checked app\Http\routes.php and changed

$app->get('/', function () use ($app) {

to

$app->get('/lumen/public/', function () use ($app) {

And it worked.

But this is not the thing I want. In Laravel the '/' works perfectly. How can I make Lumen work with '/'?


BTW when I use php artisan serv, '/' works but only in artisan serv :(

like image 911
Sky Avatar asked Jun 17 '15 12:06

Sky


1 Answers

One Way:

In /public/index.php change

$app->run();

to

$app->run($app['request']);

Another Way:

This also works too (faster):

$app->run($app->make('request'));
like image 70
Sky Avatar answered Nov 02 '22 05:11

Sky