Answers for "laravel double migration"

PHP
2

how to check linux os

cat /etc/os-release
or
hostnamectl
Posted by: Guest on March-10-2021
27

linux show version

cat /etc/os-release
Posted by: Guest on April-29-2020
21

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
5

laravel migration

php artisan make:migration create_users_table --create=users

php artisan make:migration add_votes_to_users_table --table=users
Posted by: Guest on July-18-2020
3

laravel migration integer

$table->bigInteger('votes');
Posted by: Guest on May-22-2020
2

laravel make migration

php artisan make:migration CreateUsersTable
Posted by: Guest on May-04-2020

Browse Popular Code Answers by Language