file('file'); $filename = time() . $file->getClientOriginalName(); $path = Storage::putFileAs('files/', $file, $filename); return response()->json([ 'file' => $file->getClientOriginalName(), 'id' => $filename, 'path' => $path ]); } /** * * @param string $id * * @return JsonResponse * * @throws BindingResolutionException */ public function get(string $id): JsonResponse { return response()->json(['success']); } }