Asked by: prgrm
I have something like this:
$configurations = Configs:all();
foreach($configs as $config){
$documents = document::whereHas('user', function ($q) {
$q->where("portal_id", $config->id),})->get()
...
}
This does not work because $config
is not defined in the query function.
How do I put the $config->id
object there?
No comments:
Post a Comment