diff --git a/app/View/Components/BaseMediaComponent.php b/app/View/Components/BaseMediaComponent.php index d1b2055..26f6818 100644 --- a/app/View/Components/BaseMediaComponent.php +++ b/app/View/Components/BaseMediaComponent.php @@ -51,7 +51,10 @@ protected function copyFile(array $data) Storage::disk('public')->put($targetPath, $content); } - return Str::remove(env('APP_URL'), Storage::disk('public')->url($targetPath)); + return Str::remove( + app()->runningInConsole() ? '' : env('APP_URL'), + Storage::disk('public')->url($targetPath) + ); } /**