コード例 #1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     list($typeOptions, $userOptions) = $this->getUserOptionsForSelect();
     $task = Tasks::with('creator', 'assigned')->find($id);
     if ($task->scope == 'Everyone') {
         $task->task_user_id = 'any';
     }
     return view('tasks.edit', compact('task', 'userOptions', 'typeOptions'));
 }
コード例 #2
0
ファイル: User.php プロジェクト: robbiepaul/nodendb
 public function tasksCount($id)
 {
     return Tasks::with('creator', 'assigned')->where('task_user_id', $id)->orWhere('Scope', 'Everyone')->todo()->count();
 }