Answers for "laravel session add array"

PHP
1

laravel session add array

// set products.name as array
session()->put('products.name', []);


// somewhere later
session()->push('products.name', $name1);

// somewhere else later
session()->push('products.name', $name2);
Posted by: Guest on July-20-2021

Browse Popular Code Answers by Language