Ejemplo n.º 1
0
 public function deleteBulk(Request $req, Note $Note, $step_id)
 {
     $step = Step::findOrFail($step_id);
     if (!$req->has('table_records')) {
         return redirect()->route('cities.index');
     }
     $ids = $req->input('table_records');
     $Note->destroy($ids);
     return redirect()->route('registration.notes.index', $step->id)->with('success', trans('registration::notes.delete_bulk_success'));
 }
Ejemplo n.º 2
0
 public function delete($id)
 {
     $step = Step::findOrFail($id);
     if (Registration::where('registration_step_id', $step->id)->count()) {
         return redirect()->route('registration.steps.index')->with('warning', trans('registration::steps.cant_delete_with_registration'));
     }
     $step->delete();
     return redirect()->route('registration.steps.index')->with('success', trans('registration::steps.delete_success', ['name' => $step->name]));
 }