/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // $calendar = Calendar::findOrFail($id); $this->authorize($calendar); $calendar->delete(); return $calendar; }
/** * Remove the specified resource from storage. * * @param int $calendarId * @param int $timeslotId * @return \Illuminate\Http\Response */ public function destroy($calendarId, $timeslotId) { // $calendar = Calendar::findOrFail($calendarId); $this->authorize($calendar); $timeslot = Timeslot::findOrFail($timeslotId); $this->authorize($timeslot); $timeslot->delete(); return $timeslot; }