[LINUX] [Laravel] Aliase to create migration file of multiple tables at once

Thing you want to do

It is necessary to create about 100 tables in a new project I don't want to php artisan make: migration every time

How to do

Create an alias

Edit ~ / .bash_aliases

~/.bash_aliases


#make migration
function mmi(){
    while [ "$1" ]
        do
            command php artisan make:migration create_"$1"_table
            shift
    done
}

Loop as long as there are arguments and create with make: migration

After that, exit with exit and restart, or execute again with bash ~ / .bashrc and load it.

However, it is troublesome because I have to write the inside by myself ... I wish I could do something here as well

Recommended Posts

[Laravel] Aliase to create migration file of multiple tables at once
Get out of multiple loops at once
Update multiple tables at once with pandas to_sql
One-liner to create a large number of test files at once on Linux
Create multiple users with serial numbers at once with Ansible Playbook
Update multiple tables at once with pandas to_sql
Convert multiple proto files at once with python
Register multiple self-made styles in Word at once
[Linux] Grep multiple gzip files in a directory at once
Convert only date serial numbers in CSV files with awk
Rsync multiple files at once
[Laravel] Aliase to create migration file of multiple tables at once
Create multiple users with serial numbers at once with Ansible Playbook
Rsync multiple files at once
Create a shell script to run the python file multiple times
How to create a config file
Create multiple line charts from a data frame at once using Matplotlib
How to put a line number at the beginning of a CSV file