Chinh sua giao dien phu hop tailwind css va upload
Some checks failed
Tests / PHP 8.3 (push) Has been cancelled
Tests / PHP 8.4 (push) Has been cancelled
Tests / PHP 8.5 (push) Has been cancelled

This commit is contained in:
2026-05-05 09:25:28 +00:00
parent 8c6b71cb8a
commit fb1f82e1a0
12 changed files with 834 additions and 466 deletions

View File

@@ -75,7 +75,7 @@ class InteractionsRelationManager extends RelationManager
FileUpload::make('attachments')
->label(__('app.attachments'))
->multiple()
->disk('local')
->disk('public')
->directory('feedback-attachments')
->columnSpanFull(),
]);
@@ -203,15 +203,19 @@ class InteractionsRelationManager extends RelationManager
$attachments = $data['_attachments'] ?? [];
if (! empty($attachments)) {
$disk = Storage::disk('local');
$disk = Storage::disk('public');
foreach ($attachments as $path) {
if (! $disk->exists($path)) {
continue;
}
$record->attachments()->create([
'uuid' => (string) \Illuminate\Support\Str::uuid(),
'feedback_id' => $record->feedback_id,
'user_id' => auth()->id(),
'name' => basename($path),
'path' => $path,
'disk' => 'local',
'disk' => 'public',
'collection' => 'general',
'mime_type' => $disk->mimeType($path),
'size' => $disk->size($path),