I run my laravel app @localhost.
```php artisan serve --host=localhostIP```
On top I run an Andoid app with the same base URL.
Could anyone tell me how can I debug incoming APIยดs calls like if BASEURL/users is called?
Furthermore, how can I log the happening events in the console
I am developing API's with laravel too, i do it this way:
composer require laravel/homestead
to have it all in a vm ๐ see https://laravel.com/docs/master/homestead for more information, i use the "per project" installation
Download postman
to have the best tool for sending querys to your api and to test your api quick -> https://www.getpostman.com (i use it free)
configure and run your homestead (it's not that complicated).
your homestead is fit with php and xdebug enabled
i am using phpStorm and have my vagrant setup as deployment target
"listen to debug" with phpstorm
to your GET requests, add a queryparam XDEBUG_SESSION_START=PHPSTORM
i can debug my api now ๐
i also wrote https://logcrawler.de to receive the log informations of all my api's and all my server ๐คฉ
I hope, i could help you a little bit
This is my way, but I think it's not good!
Route::post('/check_api', [CheckController::class, 'testFunc'])->name('api.check_api');
Route::post('test/check_api', [CheckController::class, 'testFunc'])->name('test.check_api');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With