Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kiasaty's avatar

retrieving data from an API in a Laravel client

Hey guys,

I have built an API (server) using Lumen.

Now, I want to build a web-client for it using Laravel. I have 2 questions:

  1. In this web client, data is retrieved from the server (API), not the database. actually, there is no database. What is the STANDARD way to do this? where should I put the code for retrieving data from the API? is there any resource to read?

  2. for now, I have used a simple API token for each user for authenticating. How should the client and server talk to authenticate the user? I don't have any idea about this. Later, I'm gonna use JWT (because I've heard that it's more secure comparing to OAuth2, is it right?)

any help would be appreciated, Thanks

0 likes
1 reply

Please or to participate in this conversation.