git add .
git commit "create admin panel layout structure"
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?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.');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user