Add Original File Name to Existing Tables

As the {$name}_file_original_name column has been added to Larupload since v2.2.0, you may need to add this specific column to your existing tables.

<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;


return new class extends Migration
{
    public function up(): void
    {
        Schema::table('media', function (Blueprint $table) {
            $table->laruploadAddOriginalName('file');
        });
    }
};

The first argument of laruploadAddOriginalName should match the first argument of upload.

This column is only used when you've created table columns in HEAVY mode before.

Last updated