laravel session add array

Solutions on MaxInterview for laravel session add array by the best coders in the world

showing results for - "laravel session add array"
Sara Sofía
17 Apr 2020
1// set products.name as array
2session()->put('products.name', []);
3
4
5// somewhere later
6session()->push('products.name', $name1);
7
8// somewhere else later
9session()->push('products.name', $name2);
10