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

JelouMC's avatar

simple API and how to use it

How can i make a simple API and use it to my website

0 likes
3 replies
kh_dev1's avatar

you can go to routes folder then u will see api.php

Route::get('foo', function () { $users = \DB::table('users')->get(); return response(['message'=> $users]); });

whenever we work with API we don't have any interface if you want to test it you have to use Postman https://www.postman.com/

Please or to participate in this conversation.