Skip to content

Commit

Permalink
added has function
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Aug 6, 2020
1 parent 8d7a848 commit 87df396
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/Contracts/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,24 @@ public function getFallback($key, $default = null)
return Arr::get(config('setting.fallback'), $key);
}

/**
* Determine if a key exists in the settings data.
*
* @param string $key
*
* @return bool
*/
public function has($key)
{
if (!$this->checkExtraColumns()) {
return false;
}

$this->load();

return Arr::has($this->data, $key);
}

/**
* Set a specific key to a value in the settings data.
*
Expand Down

0 comments on commit 87df396

Please sign in to comment.