Answers for "session put laravel array"

PHP
1

laravel session put method

Session::put('key', 'value');

session(['key' => 'value']);
Posted by: Guest on September-24-2020
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