kaju74
1290
8
Laravel

How to get auth user on ajax call?

Posted 3 years ago by kaju74

Hi.

I'm trying to implement a simple "I like this" functionality to be able to let users like articles. So the ajax call will pass the corresponding article id to the backend....but how does the backend knows, which (authenticated) user makes that call? I don't want to include the user id in the request...so the backend should use the user currently logged into the system.

Does anyone knows how to do that?

Thank you, Marc

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.