This commit is contained in:
Konstantinos Arvanitakis
2026-07-01 18:35:39 +03:00
commit 9f58a36c82
44 changed files with 3848 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
<?php
namespace Modules\Core\Providers;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\ServiceProvider;
use Lunar\Admin\Filament\Resources\StaffResource;
use Lunar\Admin\Models\Staff as LunarStaff;
use Lunar\Admin\Support\Facades\LunarPanel;
use Lunar\Models\Customer as LunarCustomer;
use Modules\Core\Auth\Extensions\StaffResourceExtension;
use Modules\Core\Auth\Mail\InviteMail;
use Modules\Core\Command\CreateAdminCommand;
class AuthServiceProvider extends ServiceProvider
{
public function boot(): void
{
LunarPanel::extensions([
StaffResource::class => StaffResourceExtension::class,
]);
LunarStaff::addActivitylogExcept([
'otp_code',
'otp_expires_at',
'password',
'remember_token',
'email_verified_at',
'two_factor_secret',
'two_factor_recovery_codes',
'two_factor_confirmed_at',
]);
LunarCustomer::addActivitylogExcept([
'otp_code',
'otp_expires_at',
]);
LunarStaff::created(function (LunarStaff $staff) {
Mail::to($staff->email)->send(new InviteMail($staff->first_name));
});
if ($this->app->runningInConsole()) {
$this->app->booted(fn () => $this->commands([CreateAdminCommand::class]));
}
}
}