14684d5537
git commit "create admin panel layout structure"
44 lines
947 B
PHP
44 lines
947 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' => 'active',
|
|
]);
|
|
|
|
$this->info('hatame created successfully.');
|
|
}
|
|
}
|