plank / laravel-mediable

Laravel-Mediable is a package for easily uploading and attaching media files to models with Laravel
MIT License
774 stars 101 forks source link

Fix publish add_alt_to_media migration #353

Closed jason-nabooki closed 7 months ago

jason-nabooki commented 7 months ago

Fixing maybe a copy/paste bug in the service provider to allow the add_alt_to_media migration to be published.

frasmage commented 7 months ago

🤦

CodeWith-PeterBull commented 5 months ago

I keep getting this issue with laravel 11 after tpackage inclusion and pulishing the service provider. When i delete the migrations created after publishing the provider, the issue gets resolved. Pretty inconvinient though.

======================================================================

Cannot declare class CreateMediableTables, because the name is already in use

at database\migrations\2024_06_24_181155_create_mediable_tables.php:8 4▕ use Illuminate\Database\Schema\Blueprint; 5▕ use Illuminate\Support\Facades\Schema; 6▕ use Plank\Mediable\Media; 7▕ ➜ 8▕ class CreateMediableTables extends Migration 9▕ { 10▕ /* 11▕ Run the migrations. 12▕ *

Whoops\Exception\ErrorException

Cannot declare class CreateMediableTables, because the name is already in use

at database\migrations\2024_06_24_181155_create_mediable_tables.php:8 4▕ use Illuminate\Database\Schema\Blueprint; 5▕ use Illuminate\Support\Facades\Schema; 6▕ use Plank\Mediable\Media; 7▕ ➜ 8▕ class CreateMediableTables extends Migration 9▕ { 10▕ /* 11▕ Run the migrations. 12▕ *

1 vendor\filp\whoops\src\Whoops\Run.php:510 Whoops\Run::handleError("Cannot declare class CreateMediableTables, because the name is already in use", "C:\Users\Peter Maina\Desktop\QuestPinnacleInvestment sManagementSystem\database\migrations\2024_06_24_181155_create_mediable_tables.php ")

2 [internal]:0 Whoops\Run::handleShutdown()