Im working on a project to learn Vue.js with Laravel. I created a simple tasks application, where its possible to create, modify, mark as done, and delete tasks.
I wish to make it user individual, so i ran artisan make:auth to create the auth template. Added column : user_id to tasks table. In the Index method of TaskController instead of - return Task::all(); I tried to do - return Task::where('user_id', Auth::id() ); but its not working as I wish... If instead of Auth::id() I put 1 for example, it does return the tasks for user id 1.
Can anyone help me out?