/** * Deleted checked programs. */ public function onDelete() { if (($checkedIds = post('checked')) && is_array($checkedIds) && count($checkedIds)) { foreach ($checkedIds as $programId) { if (!($program = Program::find($programId))) { continue; } $program->delete(); } Flash::success('Program successfully deleted.'); } else { Flash::error('No program selected.'); } return $this->listRefresh(); }
public function onRun() { $this->programs = Program::all(); }