Skip to content

Commit

Permalink
fix get method
Browse files Browse the repository at this point in the history
  • Loading branch information
riipandi committed Feb 18, 2020
1 parent 72870fd commit 64583bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Opsi.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ public function exists($key)
*/
public function get($key, $default = null)
{
$opsi = self::where('key', $key)->first() ?: return $opsi->value;
if ($opsi = self::where('key', $key)->first()) {
return $opsi->value;
}

return $default;
}
Expand Down

0 comments on commit 64583bc

Please sign in to comment.