public function index() { // DB::enableQueryLog(); $lists = Todolist::where('user_id', Auth::id())->get(); // $queries = DB::getQueryLog(); // $last_query = end($queries); // dd($last_query); return view('lists.index')->with('lists', $lists); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $user_id = Auth::id(); $todoLists = Todolist::where('user_id', '=', $user_id)->get(); return Response::json($todoLists->toArray()); }