Answers for "laravel create new migration"

PHP
21

php artisan make migration

php artisan make:migration create_users_table
Posted by: Guest on January-14-2021
20

laravel foreign key

Schema::table('posts', function (Blueprint $table) {
    $table->unsignedBigInteger('user_id');

    $table->foreign('user_id')->references('id')->on('users');
});
OR
Schema::table('posts', function (Blueprint $table) {
    $table->foreignId('user_id')->constrained();
});
Posted by: Guest on December-09-2020
1

create database from migration laravel for all

php artisan migrate:refresh

php artisan migrate:refresh --seed
Posted by: Guest on August-05-2020
0

laravel create new migration

php artisan make:migration create_flights_table
Posted by: Guest on February-16-2021
2

laravel create migration

php artisan make:migration add_votes_to_users_table --table=users

php artisan make:migration create_users_table --create=users
Posted by: Guest on June-27-2020
2

artisan make migration with model

php artisan make:Model Status -m
Posted by: Guest on November-06-2020

Code answers related to "laravel create new migration"

Browse Popular Code Answers by Language