/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $delivery = (new Delivery())->find($id); if (!$delivery) { return; } $vimeo = $delivery->vimeo; Vimeo::destroy($vimeo['id']); Event::where('deliveryID', '=', $id)->delete(); return Delivery::destroy($delivery['id']); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { return Vimeo::all(); }