Support the ongoing development of Laravel.io →
Laravel Laravel.io Middleware
Last updated 8 months ago.
0
moderator

Your document root should be the directory public where every request should be handled by index.php (so the file public/index.php )

With the route example from the documentation in your routes file:

use Illuminate\Support\Facades\Route;

Route::get('/greeting', function () {
    return 'Hello World';
});

And you visit http://yourdomain.tld/greeting you will get Hello World.

1

Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

Ramsy ramsey555 Joined 7 Oct 2021

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.

© 2023 Laravel.io - All rights reserved.