id(); $table->foreignIdFor(User::class, 'user_id')->nullable()->nullOnDelete(); $table->string('name'); $table->string('slug')->unique(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('courses'); } };