public function recycleBin($task) { //put the task into the recycle bin if (Auth::check()) { $id = $task; Task::destroy($id); if (Auth::user()->admin == 'true') { $deletedTasks = Task::onlyTrashed()->paginate(5); return Redirect::Route('tasks.index', ['deletedTasks' => $deletedTasks]); } } return Redirect::route('tasks.index'); }
/** * Remove the specified resource from storage. * DELETE /tasks/{id} * * @param int $id * @return Response */ public function destroy($id) { $status = Task::destroy($id); return $status ? ['status' => true] : ['status' => false]; }
public static function destroy($id) { self::check_logged_in(); $task = new Task(array('id' => $id)); $projects = Task::getMemberOfProjects($id); $task->destroy(); foreach ($projects as $project) { Project::updateCount($project); } Redirect::to('/task', array('message' => 'Task removed successfully')); }
public function delete($id) { Task::destroy($id); return redirect('tasks/index'); }
public function killtask() { $Task = new Task($_REQUEST['id']); $Task->destroy(); $this->FOGCore->redirect('?node=' . $this->node); }
public static function destroy($id) { parent::check_logged_in(); Task::destroy($id); Redirect::to('/task', array('message' => 'Task has been removed.')); }