Skip to content

Commit 102ade4

Browse files
committed
optional for tenant()
1 parent e88801a commit 102ade4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function tenancy($key = null)
2020
function tenant($key = null)
2121
{
2222
if (! is_null($key)) {
23-
return app(Tenant::class)->get($key);
23+
return optional(app(Tenant::class))->get($key) ?? null;
2424
}
2525

2626
return app(Tenant::class);

0 commit comments

Comments
 (0)