如何优化以下查询Laravel?

我的代码运行得很好。

 $amenityCategoryMapping1 = AmenityCategoryMapping::where('property_id', $property->id)
    ->orderBy('amenity_name','asc')
    ->orderBy('updated_at','desc')
    ->pluck('category_id', 'amenity_name')->toArray();

$amenityCategoryMapping2 = AmenityCategoryMapping::where('company_id', $property->company_id)
    ->orderBy('amenity_name','asc')
    ->orderBy('updated_at','desc')
    ->pluck('category_id', 'amenity_name')->toArray();

$amenityCategoryMapping3 = AmenityCategoryMapping::whereNull('property_id')
    ->orderBy('amenity_name','asc')
    ->orderBy('updated_at','desc')
    ->pluck('category_id', 'amenity_name')->toArray();

$amenityCategoryMapping = array_merge($amenityCategoryMapping3, $amenityCategoryMapping2, $amenityCategoryMapping1 );

但是,当前我正在执行3个不同的查询,只是使用不同的参数从同一张表中提取数据。有什么方法可以最小化此查询请求并仍然接收相同的结果?

Currently, while plucking if two array has the same key then I am replacing amenityCategoryMapping3 by amenityCategoryMapping2 and that by amenityCategoryMapping1. That is more priority should be given to amenityCategoryMapping1