Hegabovic
Hegabovic
FFilament
Created by Hegabovic on 12/31/2023 in #❓┊help
filament spatie roles and permissions
yeah this logic is not working
24 replies
FFilament
Created by Hegabovic on 12/31/2023 in #❓┊help
filament spatie roles and permissions
No description
24 replies
FFilament
Created by Hegabovic on 12/31/2023 in #❓┊help
filament spatie roles and permissions
but still it doesn't so all system is down
24 replies
FFilament
Created by Hegabovic on 12/31/2023 in #❓┊help
filament spatie roles and permissions
it should by default apear in each clinic registered
24 replies
FFilament
Created by Hegabovic on 12/31/2023 in #❓┊help
filament spatie roles and permissions
No description
24 replies
FFilament
Created by Hegabovic on 12/31/2023 in #❓┊help
filament spatie roles and permissions
no in docs said leave the roles without assigned clinic id to be global with all team
24 replies
FFilament
Created by Hegabovic on 12/31/2023 in #❓┊help
filament spatie roles and permissions
here is the super admin seeder
public function run(): void
{
$codeGenerator = new CodeGenerator();
$code = $codeGenerator->setModel(User::class)->create();

$user = User::updateOrInsert(
['email' => '[email protected]'],
[
'name' => 'admin',
'email' => '[email protected]',
'password' => Hash::make('[email protected]'),
'code' => $code,
'created_at' => now(),
'updated_at' => now(),
]
);

$user = User::where('email', '[email protected]')->first();

if ($user) {
// Find or create the clinic
$clinic = Clinic::firstOrCreate([
// Add any necessary clinic creation logic here
'name' => 'Clinic 1',
'slug' => 'clinic-1',
'created_at' => now(),
'updated_at' => now(),
]);
$user->clinics()->syncWithoutDetaching([$clinic->id]);
$user->assignRole('super_admin');
dd($user);
}

$this->command->info('Super admin seeder added.');
}
public function run(): void
{
$codeGenerator = new CodeGenerator();
$code = $codeGenerator->setModel(User::class)->create();

$user = User::updateOrInsert(
['email' => '[email protected]'],
[
'name' => 'admin',
'email' => '[email protected]',
'password' => Hash::make('[email protected]'),
'code' => $code,
'created_at' => now(),
'updated_at' => now(),
]
);

$user = User::where('email', '[email protected]')->first();

if ($user) {
// Find or create the clinic
$clinic = Clinic::firstOrCreate([
// Add any necessary clinic creation logic here
'name' => 'Clinic 1',
'slug' => 'clinic-1',
'created_at' => now(),
'updated_at' => now(),
]);
$user->clinics()->syncWithoutDetaching([$clinic->id]);
$user->assignRole('super_admin');
dd($user);
}

$this->command->info('Super admin seeder added.');
}
24 replies
FFilament
Created by Hegabovic on 12/31/2023 in #❓┊help
filament spatie roles and permissions
when seeding a user $user->assignRole('super_admin'); it give this error SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'clinic_id' cannot be null (Connection: mysql, SQL: insert into model_has_roles (clinic_id, model_id, model_type, role_id) values (?, 1, Hegabovic\UserManagement\Models\User, 1))
24 replies
FFilament
Created by Hegabovic on 12/31/2023 in #❓┊help
filament spatie roles and permissions
still not working :((
24 replies
FFilament
Created by Hegabovic on 12/31/2023 in #❓┊help
filament spatie roles and permissions
no no spatie permisions and roles , filament shield both of these
24 replies
FFilament
Created by Hegabovic on 12/31/2023 in #❓┊help
filament spatie roles and permissions
Can you share knowleage , my problems are with modifying relations
24 replies
FFilament
Created by Hegabovic on 12/31/2023 in #❓┊help
filament spatie roles and permissions
keep me updated with your news 😄
24 replies
FFilament
Created by Hegabovic on 12/31/2023 in #❓┊help
filament spatie roles and permissions
yeah me too same as you 😄 with filament shield and spatie roles and permissions 😄
24 replies
FFilament
Created by Hegabovic on 10/25/2023 in #❓┊help
Help with Tenancy With Laravel Package
The PR is not accepted yet 😂
94 replies
FFilament
Created by Hegabovic on 10/25/2023 in #❓┊help
Help with Tenancy With Laravel Package
please re-check steps if not working we can check it together 😄
94 replies
FFilament
Created by Hegabovic on 10/25/2023 in #❓┊help
Help with Tenancy With Laravel Package
i did it multiaple times on new project and pre-existing project and it always work 😄 , and no you dont need a users table in the central domain
94 replies
FFilament
Created by Hegabovic on 10/25/2023 in #❓┊help
Help with Tenancy With Laravel Package
here is the PR 😄 hope to see it soon on filament 😄 https://github.com/filamentphp/filamentphp.com/pull/219
94 replies
FFilament
Created by Hegabovic on 10/25/2023 in #❓┊help
Help with Tenancy With Laravel Package
thanks a lot for providing me this opportiunty ❤️ ❤️
94 replies
FFilament
Created by Hegabovic on 10/25/2023 in #❓┊help
Help with Tenancy With Laravel Package
done 😄 i'm really excited 😄
94 replies
FFilament
Created by Hegabovic on 10/25/2023 in #❓┊help
Help with Tenancy With Laravel Package
yeah i made it in .md formate 😄
94 replies