I am running Laravel 5.x with valet on OS X...
When I execute the following query, I get the response I am looking for...
$orders = \App\Order::with([
'Customer' => function ($query) use ($filterFirst, $filterLast)
{
if($filterFirst) {
$query->where('customers.first', 'LIKE', "{$filterFirst}%");
}
if($filterLast) {
$query->where('customers.last', 'LIKE', "{$filterLast}%");
}
return $query;
}
]);
However, When I execute this next query, I get a 502 Bad Gateway...
$orders = \App\Order::with([
'Customer' => function ($query) use ($filterFirst, $filterLast)
{
if($filterFirst) {
$query->where('customers.first', 'LIKE', "{$filterFirst}%");
}
if($filterLast) {
$query->where('customers.last', 'LIKE', "{$filterLast}%");
}
return $query;
},
'Group' => function ($query) use ($filtercategory)
{
if($filtercategory) {
$query->where('order_groups.groupid', '=', $filtercategory);
}
return $query;
}
]);
Any ideas on how I can further troubleshoot this issue or why it may be happening?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire