php artisan migrate : make create_mytable 실패 : "migrate : make"가 정의되지 않았습니다.
내 Laravel 5 애플리케이션의 루트에서 다음 명령을 실행할 때,
php artisan migrate:make create_mytable
다음과 같은 오류가 발생합니다.
[InvalidArgumentException]
Command "migrate:make" is not defined.
Did you mean one of these?
migrate:reset
migrate:refresh
migrate:status
migrate:rollback
migrate:install
migrate
Laravel 5에서 마이그레이션을 시작하는 새로운 방법이 있습니까?
구문이로 변경되었습니다 php artisan make:migration
.
다음은 사용 가능한 make 명령입니다.
make:auth Create auth classes for the application
make:console Create a new Artisan command
make:controller Create a new resource controller class
make:filter Create a new route filter class
make:migration Create a new migration file
make:provider Create a new service provider class
make:request Create a new form request class
다음을 실행하여 전체 명령 목록을 볼 수 있습니다. php artisan list
Laravel Generators 패키지에 포함 되어있을 수도 있습니다 .
Laravel 5와 함께 사용하려면 다음이 필요합니다. "way/generators": "~3.0"
다음과 같은 추가 명령을 제공합니다.
generate:controller Generate a controller
generate:migration Generate a new migration
generate:model Generate a model
generate:pivot Generate a pivot table
generate:publish-templates Copy generator templates for user modification
generate:resource Generate a new resource
generate:scaffold Scaffold a new resource (with boilerplate)
generate:seed Generate a database table seeder
generate:view Generate a view
예, Laravel 5에서는
php artisan make:migration (followed by the usual parameters you would have used before)
Laravel 5에서 마이그레이션을 생성하는 artisan 명령은 다음과 같습니다.
php artisan make:migration create_my_table --create="my_table"
사용 가능한 모든 인수 목록을 보려면 artisan 명령 앞에 "help" 를 붙일 수 있습니다 .
php artisan help make:migration
예. Laravel 5 upwords php 명령이 업데이트되었습니다. 아래를보십시오.
php artisan make:migration create_mytable
그것은 나를 위해 일했습니다.
나는 타이핑하기에 좋은 것으로 생각한다 php artisan
. 장인 명령 목록을 출력해야합니다.
Available commands:
clear-compiled Remove the compiled class file
down Put the application into maintenance mode
env Display the current framework environment
help Displays help for a command
inspire Display an inspiring quote
list Lists commands
migrate Run the database migrations
optimize Optimize the framework for better performance
serve Serve the application on the PHP development server
tinker Interact with your application
up Bring the application out of maintenance mode
app
app:name Set the application namespace
auth
auth:clear-resets Flush expired password reset tokens
cache
cache:clear Flush the application cache
cache:forget Remove an item from the cache
cache:table Create a migration for the cache database table
config
config:cache Create a cache file for faster configuration loading
config:clear Remove the configuration cache file
db
db:seed Seed the database with records
event
event:generate Generate the missing events and listeners based on registration
key
key:generate Set the application key
make
make:auth Scaffold basic login and registration views and routes
make:command Create a new Artisan command
make:controller Create a new controller class
make:event Create a new event class
make:job Create a new job class
make:listener Create a new event listener class
make:mail Create a new email class
make:middleware Create a new middleware class
make:migration Create a new migration file
make:model Create a new Eloquent model class
make:notification Create a new notification class
make:policy Create a new policy class
make:provider Create a new service provider class
make:request Create a new form request class
make:seeder Create a new seeder class
make:test Create a new test class
migrate
migrate:install Create the migration repository
migrate:refresh Reset and re-run all migrations
migrate:reset Rollback all database migrations
migrate:rollback Rollback the last database migration
migrate:status Show the status of each migration
notifications
notifications:table Create a migration for the notifications table
queue
queue:failed List all of the failed queue jobs
queue:failed-table Create a migration for the failed queue jobs database table
queue:flush Flush all of the failed queue jobs
queue:forget Delete a failed queue job
queue:listen Listen to a given queue
queue:restart Restart queue worker daemons after their current job
queue:retry Retry a failed queue job
queue:table Create a migration for the queue jobs database table
queue:work Start processing jobs on the queue as a daemon
route
route:cache Create a route cache file for faster route registration
route:clear Remove the route cache file
route:list List all registered routes
schedule
schedule:run Run the scheduled commands
session
session:table Create a migration for the session database table
storage
storage:link Create a symbolic link from "public/storage" to "storage/app/public"
vendor
vendor:publish Publish any publishable assets from vendor packages
view
view:clear Clear all compiled view files
이것은 귀중한 목록입니다. 마이그레이션 파일을 만들려면 다음을 입력해야합니다.
php artisan make:migration
Laravel의 이전 버전 (예 : Laravel 4)은 마이그레이션 파일을 생성하는 구문이 다릅니다.
php artisan migrate:make
Laravel 5에서는 만들 수있는 목록이 많기 때문에 의미가 있습니다.
make:auth Scaffold basic login and registration views and routes
make:command Create a new Artisan command
make:controller Create a new controller class
make:event Create a new event class
make:job Create a new job class
make:listener Create a new event listener class
make:mail Create a new email class
make:middleware Create a new middleware class
make:migration Create a new migration file
make:model Create a new Eloquent model class
make:notification Create a new notification class
make:policy Create a new policy class
make:provider Create a new service provider class
make:request Create a new form request class
make:seeder Create a new seeder class
make:test Create a new test class
Laravel5의 PHP artisan에서 사용할 수있는 명령 목록
key:generate
make:auth
make:console
make:controller
make:filter
make:migration
make:provider
make:request
migrate:install
migrate:refresh
migrate:reset
migrate:rollback
publish:assets
publish:config
publish:migrations
publish:views
이 페이지 https://laravel.com/docs/6.0/migrations 로 이동 하여 올바른 명령을 사용하기 위해 사용중인 Laravel 버전을 선택할 수 있습니다 .
'program tip' 카테고리의 다른 글
보다 전문화 된 인터페이스로 다시 캐스팅 (0) | 2020.11.05 |
---|---|
w3wp.exe 란 무엇입니까? (0) | 2020.11.05 |
String.format ()에 대한 Java의 % ld에 해당하는 C ++ (0) | 2020.11.04 |
어설 션을 완전히 비활성화하는 방법 (0) | 2020.11.04 |
Magento 결제 흐름 (0) | 2020.11.04 |