Exemplo n.º 1
0
 public function index_onDelete()
 {
     if (($checkedIds = post('checked')) && is_array($checkedIds) && count($checkedIds)) {
         foreach ($checkedIds as $projectId) {
             if (!($project = Project::find($projectId))) {
                 continue;
             }
             Assign::where('project_id', $projectId)->delete();
             $project->delete();
         }
         Flash::success('The selected projects has been deleted successfully.');
     }
     return $this->listRefresh();
 }