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

Ehtesham_Umar's avatar

how to get data local url api on blade view

http://127.0.0.1:8000/api/users

i write the code laravel API then i access postman it's fine,but how can i get data on view from database on blade file using local url ?

0 likes
4 replies
tykus's avatar

It not clear what you need here? Are you asking about querying your own API so that you can display the data on your own Blade view.

You can use a JS framework such as Vue, React, Angular to do this; even jQuery albeit less data-driven. But you also could server-render the views with the data already fetched making the application simpler

Sinnbeck's avatar

That would require you to learn js. Instead just pass the data using your controller :)

Please or to participate in this conversation.