Notice
Recent Posts
Recent Comments
Link
고양이 여름이의 지식채널
Laravel php artisan route(라우트) 명령어 본문
Laravel 프레임워크는 artisan 명령어를 사용하여 새 프로젝트 생성, 데이터베이스 마이그레이션, 단위 테스트 실행 등과 같은 다양한 작업을 수행합니다. 가장 유용한 artisan 명령 중 하나는 route 명령으로, Laravel에서 경로를 관리하는 데 사용됩니다.
Options
- list or ls : 프로그램에 등록된 모든 경로 나열합니다.
- cache : 프로그램의 모든 경로를 단일 파일로 캐시합니다.
- clear : route 캐시 파일을 지웁니다.
- middleware : route 그룹에 대한 미들웨어를 설정합니다.
#List all registered routes
php artisan route:list
#Cache all routes
php artisan route:cache
#Clear the route cache
php artisan route:clear
#Set middleware for a group of routes
php artisan route:middleware middlewareName
반응형
route:list --options
다음 옵션을 사용할 수 있습니다.
- --name : 지정한 이름의 route만 표시합니다.
- --path : 지정된 route의 경로만 표시합니다.
- --method : 지정된 HTTP 메서드(GET, POST, PUT, DELETE 등)가 있는 route만 표시합니다.
- --reverse : 표시된 route의 순서를 역순으로 바꿉니다.
- --sort : 표시된 route를 이름별로 정렬합니다.
php artisan route:list --method=GET
route:cache --options
다음 옵션을 사용할 수 있습니다.
- --force : 기존 route 캐시 파일 덮어쓰기.
php artisan route:cache --force
route:cache --options
- --raw : route 할당된 미들웨어를 테이블이 raw 형식으로 표시합니다.
php artisan route:middleware --raw
Resource
https://laravel.com/docs/9.x/routing
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
laravel.com
Laravel 소개 및 설치
라라벨 소개. 라라벨(Laravel)은 웹 애플리케이션 개발에 사용되는 자유 오픈 소스 PHP 프레임워크이다. 라우팅, 보안 및 데이터베이스 관리와 같은 작업을 위한 일련의 도구와 기능을 제공하여 개
summer-cat93.tistory.com
728x90
반응형
Comments