Une collection organisée de snippets de code pour accélérer votre développement. Parcourez, recherchez et copiez en un clic.
$table->foreignId('user_id')->constrained()->onDelete('cascade');
public function down()
{
Schema::dropIfExists('flights');
}
Schema::create('flights', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->timestamps();
});
\App\Models\User::factory(10)->create();