Stelle das U0-Fundament mit CMS, Mitgliedern und Filament bereit.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
89b35ac480
commit
2035c46edd
130 files changed
+18519
-50
No files matched your search
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Queue\Queueable;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class PublishPublicMedia implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
public function __construct(public string $path) {}
|
||||
|
||||
public function handle(): void
|
||||
{
|
||||
if (str_contains($this->path, '..') || ! str_starts_with($this->path, 'cms/')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$incoming = Storage::disk('cms_incoming');
|
||||
|
||||
if (! $incoming->exists($this->path)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Storage::disk('media_public')->put($this->path, $incoming->get($this->path));
|
||||
$incoming->delete($this->path);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user