Chinh sua giao dien phu hop tailwind css va upload
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user