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

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!

LoadForge

Your banner here too?

Ramsy Ramsy ramsey555 Joined 7 Oct 2021

Moderators

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

Your logo here?

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

© 2022 Laravel.io - All rights reserved.