我是一個新的laraveler,現在我工作與laravel的問題。我想/
直接給一個anguler index.html
。和其他人路線laravel控制器。但是當\
直接。其他路由工作錯誤到views
目錄。
的\app\Http\route.php
喜歡如下:laravel路由工作錯誤,直接到視圖
Route::get('/',function(){
return File::get(public_path().('/views/index.html'));
});
Route::get('scan', "[email protected]");
Route::get('check', "[email protected]");
Route::get('login', "[email protected]");
的directy是一樣的東西如下:
├── app │ ├── Http │ │ ├── route.php //route file │ ├── Library │ ├── Providers │ ├── Services │ ├── User.php │ └── views
│ │ ├── Index.php // php index file , the entry for nginx server │ └── .......... ├── bootstrap │ ├── app.php │ ├── autoload.php │ └── cache ├── config │ ├── app.php │ └── view.php │ └── .......... ├── public │ ├── bower_components │ ├── css │ ├── data │ ├── index.bak │ ├── index.html //angular index file │ └── scripts │ └── ..........
現在,當我訪問http://hostname/scan談到404沒有找到。
和日誌等如下: ``` * 2221開放() 「/服務/角laravel /應用/視圖/掃描」 失敗(2:沒有這樣的文件或目錄),客戶端:XXXX,服務器:主機名,要求: 「GET /掃描HTTP/1.1」,主持人: 「banliyun.com:8081」
```
,因爲我是用怎樣的路線工作有點迷惑。有人可以告訴我爲什麼它會路由到/放置laravel索引頁面的目錄。