public function deleteBulk(Request $req, EvaluationElement $element) { // if the table_records is empty we redirect to the subject index if (!$req->has('table_records')) { return redirect()->route('e.quran.index'); } // we get all the ids and put them in a variable $ids = $req->input('table_records'); // we delete all the subject with the ids $ids $element->destroy($ids); // we redirect to the user index view with a success message return redirect()->route('e.quran.index')->with('success'); }