- Install Eloquent
php laragram install:eloquent
- Remove Eloquent
php laragram remove:eloquent
- learn to work with Eloquent and Laravel query builder Use the following links:
php laragram make:model {model_name}
php laragram make:model User
- Create new table
php laragram make:migration {migration_name} --create={table_name}
php laragram make:migration create_users_table --create=users
- Edit table
php laragram make:migration {migration_name} --table={table_name}
php laragram make:migration edit_users_table --table=users
Note:
- Note that the names of the migrations should be similar to the example above >
create_{table_name}_table
>edit_{table_name}_table
- The table_name must be plural (
users
,addresses
)
- Build a migration
- Open the created file ( path: Database/Mysql/Migrations/ )
- Start writing ( An example has been created for you )
- It is better to learn to work with Eloquent and Laravel query builder Use the following links:
php laragram migrate
php laragram make:factory {factory_name}
php laragram make:factory User
- It is better to learn to work with Factory Use the following links:
php laragram make:seeder {seeder_name}
php laragram make:seeder User
- It is better to learn to work with Seeder Use the following links:
php laragram db:seed --seeder={seeder_name}
php laragram db:seed --seeder=User