Skip to content

Commit f618bfc

Browse files
Merge pull request #15 from f-liva/feature/fix-dependency-resolving
Fix Unresolvable dependency resolving [Parameter #0 [ string $default ]] in class Whitecube\LaravelTimezones\Timezone
2 parents 3e7cc36 + 22b8c87 commit f618bfc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Timezone.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@ class Timezone
2323
/**
2424
* Create a new singleton instance.
2525
*/
26-
public function __construct(string $default)
26+
public function __construct(string $default = '')
2727
{
28+
if (empty($default)) {
29+
$default = config('app.timezone');
30+
}
31+
2832
$this->setStorage($default);
2933
$this->setCurrent($default);
3034
}

0 commit comments

Comments
 (0)