Feat: Upgrading Lunar to 1.5

This commit is contained in:
2026-08-31 13:16:13 +03:00
parent 661e8b9a96
commit d873cb4931
42 changed files with 229 additions and 173 deletions
+2 -1
View File
@@ -2,6 +2,7 @@
namespace Modules\Core\Command;
use Lunar\Admin\Models\Staff;
use Lunar\Admin\Console\Commands\MakeLunarAdminCommand;
use function Laravel\Prompts\text;
@@ -31,7 +32,7 @@ class CreateAdminCommand extends MakeLunarAdminCommand
required: true,
validate: fn (string $email): ?string => match (true) {
! filter_var($email, FILTER_VALIDATE_EMAIL) => 'The email address must be valid.',
\Lunar\Admin\Models\Staff::where('email', $email)->exists() => 'A user with this email address already exists',
Staff::where('email', $email)->exists() => 'A user with this email address already exists',
default => null,
},
),