Xampp localhost无法正常工作

Prz*_*mek 2 xampp localhost laravel laravel-5

我在xampp上运行laravel,我在访问页面时http://localhost/laravel/public/遇到问题, 我得到一个很好的登录页面,但是当我举个例子时http://localhost/laravel/public/smokeyard

我得到404错误The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

路线:

Route::get('smokeyard', 'GuzzleController@smokeyard');
Run Code Online (Sandbox Code Playgroud)

控制器:

function smokeyard(){
    return view('smokeyard');
}
Run Code Online (Sandbox Code Playgroud)

我的所有视图都位于资源文件夹中.

Exp*_*tor 5

如果你想在不运行的情况下访问laravel项目artisan serve,你需要更改一些设置,

  1. 在复制.htaccess文件从public folderpaste它在root folder你的application

  2. renameserver.phproot directory to index.php

现在去找localhost/your_project_name/smokeyard你想检查的网址

希望这可以帮助