Laravel Equivalent to JavaScript's ...prev

I'm trying to add an attribute to be passed in data but I would like all other attributes to stay.

$data = $request->all();

Is it possible to do this:

$data =[...data, 'Total'=> $total]

I think that ...data is for javascript. Is there an equivalent in laravel?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3eFFK3Y
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

How to Create Treeview with Bootstrap and jQuery

jQuery Datatables with PHP, MySQL and AJAX Example

How to Add Images to Dropdown List using jQuery