I'm working with an inventory system and I'm in the part where the cashier adds items to be purchased. So the tables i'm working with in that particular module is sales and sale\_items. So the relationship is 1 sale has many sale\_items.

So my question is. How can I send a request in one go without using ajax. Currently I'm using ajax but my controller requires authentication. I turned off the authentication to make the ajax request work. Below is the sample request body that I wanna send without ajax.

```
sales{
   date_sold: 04/01/2019,
   discount: 2000,
   branch_id
   sales_item: 
   {
      product_id: 1,
      quantity: 20,
      unit_price: 200
   },
   {
      product_id: 2,
      quantity: 40,
      unit_price: 100
   },
   {
      product_id: 3,
      quantity: 50,
      unit_price: 300
   }
}

```

I want to insert these data to the sales and sales\_item tables respectively. How do I process it in laravel?