همین اول بسم الله به ارور خوردم ?
سلام هنگام migrate کردن جدول products به ارور میخورم:: بقیه ی جدولها migrate میشن و مشکلی نیست ولی این یکی هرکاری میکنم ارور میده که foreign key مشکل داره.
<?php use Illuminate\\Database\\Migrations\\Migration; use Illuminate\\Database\\Schema\\Blueprint; use Illuminate\\Support\\Facades\\Schema; return new class extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('products', function (Blueprint $table) { $table->id(); $table->char('title'); $table->text('description'); $table->char('thumbnail_url'); $table->char('demo_url'); $table->char('source_url'); $table->unsignedInteger('price'); $table->unsignedInteger('category_id'); $table->foreign('category_id')->references('id')->on('categories')->onDelete('cascade'); $table->unsignedBigInteger('owner_id'); $table->foreign('owner_id')->references('id')->on('users')->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('products'); } };