Skip to content

Commit 87df396

Browse files
committed
added has function
1 parent 8d7a848 commit 87df396

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/Contracts/Driver.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,24 @@ public function getFallback($key, $default = null)
6464
return Arr::get(config('setting.fallback'), $key);
6565
}
6666

67+
/**
68+
* Determine if a key exists in the settings data.
69+
*
70+
* @param string $key
71+
*
72+
* @return bool
73+
*/
74+
public function has($key)
75+
{
76+
if (!$this->checkExtraColumns()) {
77+
return false;
78+
}
79+
80+
$this->load();
81+
82+
return Arr::has($this->data, $key);
83+
}
84+
6785
/**
6886
* Set a specific key to a value in the settings data.
6987
*

0 commit comments

Comments
 (0)