Answers for "references laravel migration"

PHP
6

foreign key in laravel migration

$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
Posted by: Guest on June-21-2021
0

laravel dropIndex

Schema::table('geo', function (Blueprint $table) {
    $table->dropIndex(['state']); // Drops index 'geo_state_index'
});
Posted by: Guest on July-28-2020
3

laravel migration integer

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

Code answers related to "references laravel migration"

Browse Popular Code Answers by Language