我在带有 PHP74 的 Apache24 上运行 Laravel 8.0.1
当我创建一个新项目时,欢迎页面呈现良好。如果我添加另一条路线,我总是得到 404
% composer create-project --prefer-dist laravel/laravel test123
Installing laravel/laravel (v8.0.1)
- Installing laravel/laravel (v8.0.1): Loading from cache
...
...
Package manifest generated successfully.
69 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> @php artisan key:generate --ansi
Application key set successfully.
%
% cd test123
% chmod a+w storage/logs/ storage/framework/sessions/ storage/framework/views/ bootstrap/cache/
% npm install
% npm run dev
Laravel 页面现在渲染得很好。看我的好:)
但是如果我添加一条新路线routes/web.php
Route::get('/about', function () {
return view('welcome');
});
并尝试在 /about 访问页面我会得到一个 404 不幸的是它storage/logs/laravel.log
是空的(当我访问 / 页面时也没有条目)