chiave esterna laravel
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();
});
php artisan make migrazione
php artisan make:migration create_users_table
php artisan make migrazione
php artisan make:migration create_users_table
migrazione laravel
php artisan migrate
come migrare una singola tabella in laravel
php artisan migrate --path=/database/migrations/2020_04_10_130703_create_test_table.php
aggiungi colonna nella migrazione di laravel
php artisan make:migration add_paid_to_users_table --table=users
crea migrazione laravel
php artisan make:migration create_users_table
crea tabella di migrazione in php
php artisan make:migration create_users_table
migrazione artigianale con modello
php artisan make:Model Status -m
modello artigianale con migrazione
php artisan make:model Model_Name -m