/**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function get($id)
 {
     $model = Fileentry::findOrFail($id);
     if (!$model) {
         return response(null, 302);
     } else {
         $file = Storage::disk('local')->get($model->filename);
         return (new Response($file, 200))->header('Content-Type', $model->mime);
     }
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int $id
  * @return Response
  */
 public function get($id)
 {
     try {
         $model = Fileentry::findOrFail($id);
         $filename = base_path() . $model->name;
         $file_content = File::get($filename);
         return (new Response($file_content, Response::HTTP_OK))->header('Content-Type', $model->mime_type);
     } catch (Exception $e) {
         return new Response($e->getMessage(), Response::HTTP_NOT_FOUND);
     }
 }