id(); $table->morphs('owner'); $table->string('document_type'); $table->string('reference'); $table->integer('status')->default(ApprovalStatus::PENDING_VERIFICATION); $table->timestamp('issued_date')->nullable(); $table->timestamp('expired_date')->nullable(); $table->foreignId('approver')->nullable()->unsigned(); $table->timestamp('approval_date')->nullable(); $table->softDeletes(); $table->timestamps(); $table->foreign('approver')->references('id')->on('users'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('documents'); } }