Beispiel #1
0
 /**
  * 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();
 }
Beispiel #2
0
 public function onRun()
 {
     $this->programs = Program::all();
 }