Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
Remove scopes from Media Find Logic
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNagel01 committed Jan 12, 2023
1 parent 6de5b95 commit 57ba741
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Controllers/UploadFileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function store(UploadFileRequest $request)
$data = $request->all();
$objectClass = $data['object_type'];
$objectKey = $data['object_id'];
$object = $objectClass::find($objectKey);
$object = $objectClass::withoutGlobalScopes()->find($objectKey);

$object->addMedia($request->file('file'))->toMediaCollection('files');
return redirect()->back();
Expand Down

0 comments on commit 57ba741

Please sign in to comment.