Conixs
110
5
Laravel

Create an Object[]

Posted 6 months ago by Conixs

I'm trying to create a variable that contains an array of objects as below:

$products = [
        {
            "SellerPersonType": 1,
            "SellerName": "Carlos",
            "SellerTaxNumber": 11122233300,
            "ReceiverPersonType": 0,
            "ReceiverName": "Caio",
            "ReceiverTaxNumber": 11122233300
        }
    ];

However, it is giving syntax error! Could someone help me?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.