handling multiple localisation in artisan query
This commit is contained in:
parent
d6ec861bf0
commit
2e930f0048
|
|
@ -43,13 +43,14 @@ function build_search_artisan_posts_cards($request)
|
|||
)
|
||||
);
|
||||
$metaQuery = [];
|
||||
|
||||
if ($localisation && $localisation !== 'all') {
|
||||
$localisationArray = explode(',', $localisation); // Séparer les localisations par des virgules
|
||||
$metaQuery[] = array(
|
||||
'key' => 'state',
|
||||
'value' => $localisation,
|
||||
'compare' => '='
|
||||
'value' => $localisationArray,
|
||||
'compare' => 'IN', // Comparer avec plusieurs valeurs
|
||||
);
|
||||
// write_log($metaQuery);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user