<?php
$data1 = [
['name' => 'a'],
['name' => 'b'],
['name' => 'c'],
['name' => 'd'],
['name' => 'e'],
['name' => 'f'],
['name' => 'g'],
];
$data2 = [
['name' => 'a'],
['name' => 'd'],
['name' => 'f'],
];
//想要的结果
$result = [
['name' => 'a', 'checked' => true],
['name' => 'b'],
['name' => 'c'],
['name' => 'd', 'checked' => true],
['name' => 'e'],
['name' => 'f', 'checked' => true],
['name' => 'g'],
];
//请教 以上问题 在 laravel 怎么实现
修改的评论也不能少于六个字哦!
0
分享