mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 06:04:03 +00:00
instanceof closure check
This commit is contained in:
parent
81deb1c553
commit
f6f6b51dc3
1 changed files with 2 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace Stancl\Tenancy;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Database\DatabaseManager as BaseDatabaseManager;
|
||||
use Illuminate\Foundation\Application;
|
||||
|
|
@ -165,7 +166,7 @@ class DatabaseManager
|
|||
} else {
|
||||
$manager->createDatabase($database);
|
||||
foreach ($afterCreating as $item) {
|
||||
if (is_object($item)) {
|
||||
if (is_object($item) && ! $item instanceof Closure) {
|
||||
$item->handle($tenant);
|
||||
} else {
|
||||
$item($tenant);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue