/** * Remove the specified activity from storage. * * @param int $id * @return Response */ public function destroyImage(Request $request, AlbumsRepo $album_repo) { $image_id = $request->input('image_id'); $delete = $album_repo->removeImage($image_id); return json_encode('true'); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index(AlbumsRepo $album_repo) { $albums = $album_repo->getAll(); return view('home.index', compact('albums')); }