Laravel 8 Arr::hasAny() {#collection-method}
Arr::hasAny
函数使用「.」符号判断数组中是否存在给定集合中的任一值作为键:
use Illuminate\Support\Arr;
$array = ['product' => ['name' => 'Desk', 'price' => 100]];
$contains = Arr::hasAny($array, 'product.name');
// true
$contains = Arr::hasAny($array, ['product.name', 'product.discount']);
// true
$contains = Arr::hasAny($array, ['category', 'product.discount']);
// false