所以我有一个变量和一个记录集:
$firstRecordID = 1;
$records = Recordset::all();
我想过滤记录集:
$filteredRecords = $records->find(function($record){
if($record->id == $firstRecordID)
return true;
else
return false;
});
不幸的是,闭包不知道 $firstRecordID 是什么。
我如何传递身份证?