Create Attachment model and its migration
ADD
app/Models/Attachment.php
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Database\Eloquent\SoftDeletes;
+
+class Attachment extends Model
+{
+ use SoftDeletes;
+}

ADD
database/migrations/2020_06_13_151635_create_attachments_table.php
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateAttachmentsTable extends Migration
+{
+ public function up(): void
+ {
+ Schema::create('attachments', function (Blueprint $table) {
+ $table->id();
+ $table->string('transaction_type');
+ $table->string('transaction_id');
+ $table->string('file_path');
+ $table->timestamps();
+ $table->softDeletes();
+ });
+ }
+
+ public function down(): void
+ {
+ Schema::dropIfExists('attachments');
+ }
+}

Create Attachment model and its migration