--- title: laravel的routes名稱與用法 tags: laravel --- * api => 用來放data * console => 用來放腳本 * web => 用來放網頁 -------------------- * routes內的程式碼```Route::any('/','Controller@index');```為例 any = 不管是get或post 網址為/的都去index 此處的index是 app / Http / Controllers 資料夾內的Controller.php裡面的function index function會return view('index' , compact('categories')); 意思是 前端頁面會在index.blade.php顯示
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up