public function deleteSelect() { // All methods inside this controller are only accessible for admins (= users that have role type 7) Auth::checkAdminAuthentication(); $idArray = $_POST['check_list']; foreach ($idArray as $material_id) { MaterialModel::deleteMaterial($material_id); } Redirect::to('material/index/0'); }