public function update($id)
 {
     $data = Request::all();
     $entry = Entry::find($id);
     $entry->fill($data);
     $entry->save();
     return response()->json($entry);
 }
 public function removeEntry()
 {
     $entryId = Request::get('entryId');
     $entry = Entry::find($entryId);
     $entry->delete();
 }
Example #3
0
 public function download($id)
 {
     $entry = Entry::find($id);
     $file = Storage::disk('local')->get($entry->filepath);
     return (new Response($file, 200))->header('Content-Type', 'application/pdf');
 }