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

تعليقات

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

5 Free Black and White Social Media Icons Sets with CSS and HTML

How to Create Treeview with Bootstrap and jQuery

How to Change Apache and MySQL Port Number in XAMPP Localhost