Solution:1
I think you can use model casting for array store in database
refer this link
https://laravel.com/docs/8.x/eloquent-mutators#array-and-json-casting
protected $casts = [
'amount' => 'array',
];
Solution:1
I think you can use model casting for array store in database
refer this link
https://laravel.com/docs/8.x/eloquent-mutators#array-and-json-casting
protected $casts = [
'amount' => 'array',
];
Solution:2
To save array you will have to use JSON format. Sometimes, you can use pivot tables to solve this problem but it has no sence to have pivot table for amount.
$data->amount = json_encode($request->get('amount'));
When getting data from database, you can make cast on model, or method which will return json_decode($this->amount)
If you would provide more information about what exactly could be in amount, I could answer better.