bigIncrements('id'); $table->enum('payment_for', ['so' ,'retainer_invoice', 'invoice','po', 'bill']); $table->bigInteger('supplier_id')->unsigned()->nullable(); // $table->foreign('supplier_id') // ->references('id') // ->on('suppliers') // ->onDelete('cascade'); $table->bigInteger('customer_id')->unsigned()->nullable(); // $table->foreign('customer_id') // ->references('id') // ->on('customers') // ->onDelete('cascade'); $table->bigInteger('chart_of_account_id')->unsigned()->nullable(); $table->foreign('chart_of_account_id') ->references('id') ->on('chart_of_accounts') ->onDelete('cascade'); $table->date('payment_date'); $table->string('reference')->nullable(); $table->text('notes')->nullable(); $table->string('amount'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('payments'); } }