Ejemplo n.º 1
0
 public function getDelete($id)
 {
     $Cities = Cities::find($id);
     $Cities->delete();
     Session::flash('message', 'The records are deleted successfully');
     return Redirect::to('cities');
 }
Ejemplo n.º 2
0
 /**
  * Form for POST doDelete the specified resource.
  *
  * @return Response
  */
 public function doDelete()
 {
     $aData = Input::all();
     if (isset($aData['id'])) {
         $city = Cities::find($aData['id']);
         $city->delete();
         return Redirect::route('city-list')->with('message', 'Город успешно удален');
     }
     return Redirect::route('city-list')->with('message', 'Произошла ошибка удаления');
 }