Laravel - Collections - Method Has

The has method determines if a given key exists in the collection:

    
    $collection = collect(['account_id' => 1, 'product' => 'Desk', 'amount' => 5]);
    
    $collection->has('product');
    
    // true
    
    $collection->has(['product', 'amount']);
    
    // true
    
    $collection->has(['amount', 'price']);
    
    // false