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

martleby's avatar

Do I need an API?

Hi all,

I'm developing a Laravel app, primarily using blade. I'm using Vue components to provide interactivity on some pages, which get and save data from the backend. I'm using web routes to provide these endpoints. These routes should only be available to authenticated and logged-in users of my application. I use Auth::user to check permissions etc.

This all appears to work quite nicely. My question: should I instead be looking into API routes, tokens authentication etc? What benefits would I get from using an API, and what sorts of problems am I likely to get with my current approach?

Thanks, Martin.

0 likes
3 replies
tykus's avatar
tykus
Best Answer
Level 104

No need to add that complexity if your web app is the only client consuming the API.

jlrdw's avatar

And I'm guessing you are already making it mobile-friendly with the correct media queries.

Please or to participate in this conversation.