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

pllaguno's avatar

Make API call with multiple parameters

I'm trying to make an API call that will be able to pull data out from a table. i have that already working and i am using a resource collection to get it paginated.

What i don't know how to make is that the information should be pulled by dates, My table has a datetime column and i want the api to have a startdatetime and enddatetime so that the response will have the data paginated from that period of time.

Is this possible?

0 likes
2 replies
pllaguno's avatar

And how are they passed to the controller? what type of validations will be needed?

This is what my controller looks like

public function show(PowerBi $ID) : PowerBiResource  
    {
       
        return new PowerBiResource($ID);
    }

Please or to participate in this conversation.