Пример #1
0
 /**
  * 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;
 }
Пример #2
0
 /**
  * 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;
 }