我正在學習Laravel這些天,而我的路線不顯示意見!Laravel的意見不起作用
這是我的代碼:
web.php
Route::get('/', function() {
return view('welcome');
});
Route::get('/about','[email protected]');
Route::get('/services','[email protected]');
PagesController
class PagesController extends Controller
{
public function about()
{
return view('pages.about');
}
public function services()
{
return view('pages.services');
}
}
about.blade.php
<!doctype html>
<html lang="{{ config('app.locale') }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{config('app.name','LSAPP')}}</title>
</head>
<body>
<h1>About</h1>
<p>This is my About page</p>
</body>
</html>
PS:我使用kubunto與燈
感謝u人在你的代碼提前
你得到什麼?有沒有錯誤? – Maraboc
當我嘗試達到** http://www.lsapp.dev/about**爲例我接受我的瀏覽器**這個網頁不工作** –
我想問題是你的Apache?你確定它正在運行嗎?並沒有主頁的作品意味着只有lsapp.dev? – Exprator