Hello World 示例(基础)

打开路线文件。将以下代码粘贴到:

Route::get('helloworld', function () {
    return '<h1>Hello World</h1>';
});

在路线 http://localhost/helloworld 后,它会显示 Hello World。

路线文件位于/routes/web.php