new app store assets ready for relese
This commit is contained in:
@@ -1,8 +1,22 @@
|
||||
<?php
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
use App\Models\User;
|
||||
Artisan::command('tarnax:admin {email}',function(){
|
||||
$user=User::where('email',$this->argument('email'))->first();if(!$user){$this->error('Register and verify this account first.');return 1;}
|
||||
if(!$user->hasVerifiedEmail()){$this->error('Verify the email address first.');return 1;}
|
||||
$user->forceFill(['is_admin'=>true])->save();$this->info('Administrator granted. Confirm 2FA in account security before opening /admin.');return 0;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
Artisan::command('tarnax:admin {email}', function () {
|
||||
$user = User::where('email', $this->argument('email'))->first();
|
||||
if (! $user) {
|
||||
$this->error('Register and verify this account first.');
|
||||
|
||||
return 1;
|
||||
}
|
||||
if (! $user->hasVerifiedEmail()) {
|
||||
$this->error('Verify the email address first.');
|
||||
|
||||
return 1;
|
||||
}
|
||||
$user->forceFill(['is_admin' => true])->save();
|
||||
$this->info('Administrator granted. Confirm 2FA in account security before opening /admin.');
|
||||
|
||||
return 0;
|
||||
})->purpose('Promote a verified customer to administrator');
|
||||
|
||||
Reference in New Issue
Block a user