コード例 #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  *
  * @return Response
  */
 public function destroy($id)
 {
     $category = MediaCategory::find($id);
     $this->checkExist($category);
     $category->delete();
     return response()->return();
 }
コード例 #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  *
  * @return Response
  */
 public function destroy($id)
 {
     $category = MediaCategory::find($id);
     if (is_null($category)) {
         throw new NotFoundException();
     }
     $category->delete();
     return response()->return();
 }