Lomkit / laravel-rest-api

Generate Api in seconds
https://laravel-rest-api.lomkit.com/
MIT License
401 stars 22 forks source link

[DOC] endpoints examples #24

Closed GautierDele closed 10 months ago

GautierDele commented 11 months ago

Description

Add examples to query calls on doc

GautierDele commented 10 months ago

Added to doc

warmwhisky commented 10 months ago

Are you able to show me where the docs are for an endpoint search or query? I am having difficulty piecing together how I would get a resource. For instance, I have a resource setup for Ledgers as follows. Rest::resource('ledger', \App\Rest\Controllers\LedgerController::class); and want to be able to retrieve a ledger by its main_account am I correct in using this package for this type of basic usage?

Edit:

Ok I have it now. I was missing the point that you needed to send the parts of the example that you need.

The following returned exactly what I needed.

{
    "filters": [
        {"field": "main_account", "operator": "=", "value": main_account_number},
    ]
}
GautierDele commented 9 months ago

@warmwhisky i'm glad you achieved your needs, don't hesitate if you have a question :)