Feat: Moving things, updating OTP, cleaning stuff up

This commit is contained in:
2026-07-03 02:15:31 +03:00
parent 15bff15cad
commit ce08287641
23 changed files with 770 additions and 119 deletions
-31
View File
@@ -2,44 +2,13 @@
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]));
}