$file, 'root' => $root, 'extraInfo' => FileManager::getAdditionalInfo($file) ]); } /** * Updates file * User can change only keywords, original filename and description. Mime type, hash and other fields remain * unchanged * * @param EditUploadedFileRequest $request * @param File $file * * @return \Illuminate\Http\RedirectResponse * @internal param $id */ public function update(EditUploadedFileRequest $request, File $file) { $repository = app(FileRepository::class); $repository->update($file, $request->all()); // fire action Event::fire(new EditFile($file)); // update successfull return redirect() ->route('upload.detail', ['file' => $file]) ->with('success', trans('admin/fileManager.successfullyChanged')); } /** * Deletes file * * @param File $file * * @return \Illuminate\Http\RedirectResponse */ public function delete(File $file) { $directoryId = $file->directory_id; $file->delete(); return redirect() ->route('upload.overview', ['id' => $directoryId]) ->with('success', trans('admin/fileManager.fileDeleted')); } }