Written by
laravel-style
on
on
[Laravel] routes
[Laravel] routes
routes/web.php에 작성
Route::get('/', function () { //uri가 '/'일 때, return view('welcome'); //views/welcome.blade.php를 보여줘라 });
views/welcome.blade.php
routes/web.php에 작성
Route::get('/test', function () { //uri가 /test 일 때, return [1, 2, 3]; //[1,2,3]을 보여줘라 });
routes/web.php에 작성
Route::get('/test2', function () { //uri가 /test2 일 때, return view('a.test2',['name' => '이름이름']); //views/a/test2를 보여주고, 'name'안에는 '이름이름'을 넣어라 });
views/a/test2에 작성
안녕하세요 {{ $name }} 입니다.
from http://soda-dev.tistory.com/49 by ccl(A) rewrite - 2021-11-17 15:01:48