Files
hatame.andarza09/app/Console/Commands/AdminGenerator.php
T
hatame 78a3b1d63d git add .
git commit "Add admin management search sort and permission structure preparation"
2026-08-18 12:56:32 +03:30

44 lines
940 B
PHP

<?php
namespace App\Console\Commands;
use App\Models\Admin;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Hash;
class AdminGenerator 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([
'first_name' => 'hatame',
'last_name' => 'andarza',
'username' => 'hatame14',
'email' => 'hatame14@gmail.com',
'mobile' => '09119533286',
'password' => Hash::make('hatame14'),
'image' => '',
'status' => 1,
]);
$this->info('hatame created successfully.');
}
}