Solved

I need guidance using Shopify APIs in my Shopify App with Laravel and React

gabrielravelo
Shopify Partner
5 0 1

Hi, I'm creating an App in shopify and I'm learning to use Shopify APIs, my app is made in Laravel and React.

 

Right now, I'm trying to create an index table with the orders of the store, I copy and paste the polaris component, that have 3 orders made in the code as example, but I want to pass the orders trough the API /orders, so I create the route in the web.php and in the component use the useAppQuery hook, I made a console.log and give me the data:

gabrielravelo_0-1684349503513.png

gabrielravelo_1-1684349541641.png

the problem that I have is when I try to pass that data to the view, I saw many examples in youtube where do it like this, but in the console it says to me that data is undefined

gabrielravelo_2-1684349748504.pnggabrielravelo_3-1684349783520.pnggabrielravelo_4-1684349843365.png

I don't know what to do, please help me.

 

Accepted Solution (1)

ShopifyDevSup
Shopify Staff
1376 229 481

This is an accepted solution.

Hi @gabrielravelo 👋

 

For issues with Shopify PHP lib, please submit the issue in the public repo shopify/shopify-api-php.

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 2 (2)

ShopifyDevSup
Shopify Staff
1376 229 481

This is an accepted solution.

Hi @gabrielravelo 👋

 

For issues with Shopify PHP lib, please submit the issue in the public repo shopify/shopify-api-php.

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

gabrielravelo
Shopify Partner
5 0 1

Ok, thanks.