feat:add admin generator and admin status

This commit is contained in:
2026-08-18 18:28:54 +03:30
parent 53f44c5cf7
commit 76a4263c1d
4 changed files with 139 additions and 0 deletions
@@ -0,0 +1,38 @@
<?php
namespace App\Console\Commands;
use App\Enums\AdminStatus;
use App\Models\Admin;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Hash;
class AdminGeneratorCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'app:admin-generator';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Execute the console command.
*/
public function handle()
{
Admin::create([
'username' => 'admin',
'password' => Hash::make('123456789'),
'status' => AdminStatus::ENABLE,
]);
$this->info('Admin created successfully.');
}
}