반응형
Route 파일 경로
Laravel 프로젝트 -> route 디렉토리 -> web.php
Route::get('hello', function()}
return 'Hello!';
});
--> GET요청 http://homestead.app/hello
Route::get('hello/world/{name}',function($name){
return 'Hello World ' . $name;
});
--> GET요청 http://homestead.app/hello/world/name변수
Route::get('hello/world/{name?}',function($name = null){
return 'Hello World ' . $name;
});
--> GET요청 http://homestead.app/hello/world/name변수(생략가능)
반응형
'프로그래밍 > Laravel5' 카테고리의 다른 글
Laravel - HTTP Response(Json변환) (0) | 2017.08.20 |
---|---|
Laravel - HTTP Response 처리 (0) | 2017.08.20 |
Laravel 개발환경 - 4. 라라벨 프로젝트 생성 (0) | 2017.08.20 |
Laravel 개발환경 - 3. DB연결 (0) | 2017.08.20 |
Laravel 개발환경 - 2. Homestead 구성 (0) | 2017.08.20 |