프로그래밍언어/php
Laravel(artisan) 명령어 정리
새끼개발자
2023. 9. 17. 18:06
artisan을 이용한 컨트롤러 생성 , model 생성 , 스키마 정의
php artisan make:controller ExController
php artisan make:model Ex
php artisan make:migration Ex_table
또는 한번에 생성
php artisan make:model Ex -mc
스키마 설정 파일 데이터베이스의 테이블로 생성
php artisan migrate
tinker을 이용해 테이블 더미값 생성 (아래는 User의 예제)
php artisan tinker
User::factory()->count(5)->create()
결과값
라라벨 캐시 지우기
php atrisan config:clear
php atrisan cache:clear
php atrisan view:clear
php atrisan route:clear