Example #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     if (Auth::hasPermission('delete')) {
         try {
             $this->sections->remove($id);
         } catch (\Illuminate\Database\Eloquent\ModelNotFoundException $e) {
             $error = Lang::get('errors.section_not_found');
             return Response::json(compact('error'), 404);
         }
     }
 }