Laravel 8 Arr::exists() {#collection-method}
Arr::exists
检查给定的键是否存在提供的数组中:
use Illuminate\Support\Arr;
$array = ['name' => 'John Doe', 'age' => 17];
$exists = Arr::exists($array, 'name');
// true
$exists = Arr::exists($array, 'salary');
// false