has方法

判断集合中是否存在给定的键。

$collection = collect(['account_id' => 1, 'product' => 'Desk']);

$collection->has('product'); // true
$collection->has('name'); // false
Copyright © http://blog.webfsd.com 2018 all right reserved,powered by Gitbook该文件修订时间: 2019-05-21 04:55:26

results matching ""

    No results matching ""