Пример #1
0
 /**
  * Delete a single initiative by id from storage
  * 
  * @param  integer $id 
  * @return \Dingo\Api\Http\Response
  */
 public function destroy($id)
 {
     $initiative = Initiative::findOrFail($id);
     $initiative->delete();
     return $this->response->noContent();
 }
 /**
  * Delete a single initiative type by id from storage
  *
  * @param  integer $initiative
  * @param  integer $type
  * @return \Dingo\Api\Http\Response
  */
 public function destroy($initiative, $type)
 {
     $type = Initiative::findOrFail($initiative)->types()->findOrFail($type);
     $type->delete();
     return $this->response->noContent();
 }