Closed axeberg closed 6 years ago
php artisan make:migration create_watchlists_table --create=watchlists
$table->increments('id'); $table->integer('movie_id')->unsigned(); $table->integer('user_id'); $table->boolean('watched')->default(false); $table->timestamps();
Relation (in the same table):
$table->foreign('movie_id')->references('movies')->on('id')->onDelete('cascade');
php artisan make:migration create_watchlists_table --create=watchlists
Relation (in the same table):