Skip to content

Commit

Permalink
Merge pull request #17 from beeglebug/master
Browse files Browse the repository at this point in the history
Updated helper function to match the signature of laravel helpers
  • Loading branch information
efriandika authored Sep 27, 2016
2 parents a514810 + f43a317 commit 6b0c381
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
if (!function_exists('settings'))
{
/**
* @param $key
* @param string|null $key
* @param null $default
* @return mixed|\Efriandika\LaravelSettings\Facades\Settings
*/
function settings($key, $default = null)
function settings($key = null, $default = null)
{
if (is_null($key)) {
return app('settings');
}

return Settings::get($key, $default);
}
}
}

0 comments on commit 6b0c381

Please sign in to comment.