📜  从集合 laravel 中调用变量 - PHP 代码示例

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

代码示例1
$accessMe = ' is the current number';
$somevariable = collect([1, 2, 3, 4])->map(function($value) use ($accessMe) {
  return $value . $accessMe; 
}