bigIncrements('id'); $table->string('name'); $table->decimal('price', 8, 2); $table->bigInteger('quantity'); $table->bigInteger('receipt_id')->unsigned(); $table->bigInteger('category_id')->unsigned(); $table->timestamps(); $table->foreign('receipt_id')->references('id')->on('receipts')->onDelete('cascade'); $table->foreign('category_id')->references('id')->on('categories')->onDelete('cascade'); $table->engine = 'InnoDB'; }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('receipt_items'); } }