mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
Enhanced admin panel
This commit is contained in:
committed by
Constantin Graf
parent
42ad5e004a
commit
0bf8a25d64
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Enums\Role;
|
||||
use App\Enums\Weekday;
|
||||
use App\Models\Organization;
|
||||
use App\Models\User;
|
||||
@@ -100,7 +101,9 @@ class UserFactory extends Factory
|
||||
->when(is_callable($callback), $callback)
|
||||
->create();
|
||||
|
||||
$organization->users()->attach($user, ['role' => 'owner']);
|
||||
$organization->users()->attach($user, ['role' => Role::Owner->value]);
|
||||
$user->currentTeam()->associate($organization);
|
||||
$user->save();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user