コード例 #1
0
 public function taskList()
 {
     //$tasks = task::all();
     //未完了のタスク一覧を表示
     $taskList = task::latest('published_at')->where('check', 0)->get();
     //完了済みのタスク一覧を表示
     $doneList = task::latest('published_at')->where('check', 1)->get();
     return view('tasks.index', compact('taskList', 'doneList'));
 }
コード例 #2
0
 public function index()
 {
     $tasklist = task::latest('created_at')->get();
     return view('tasklist', compact('tasklist'));
 }