📜  laravel 会话添加数组 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:30.983000             🧑  作者: Mango

代码示例1
// set products.name as array
session()->put('products.name', []);


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

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