add create-me command
This commit is contained in:
12
README.md
12
README.md
@@ -1 +1,13 @@
|
||||
# F
|
||||
|
||||
# Installation
|
||||
```bash
|
||||
# Clone
|
||||
|
||||
composer install
|
||||
cp .env .env.example
|
||||
|
||||
touch database/database.sqlite
|
||||
|
||||
php artisan migrate --seed
|
||||
```
|
||||
|
||||
@@ -1,8 +1,22 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
Artisan::command('inspire', function () {
|
||||
$this->comment(Inspiring::quote());
|
||||
})->purpose('Display an inspiring quote')->hourly();
|
||||
|
||||
Artisan::command('create-me', function () {
|
||||
User::create([
|
||||
'first_name' => 'Nurmuhammet',
|
||||
'last_name' => 'Allanov',
|
||||
'name' => 'Nurmuhammet Allanov',
|
||||
'email' => 'nurmuhammet@mail.com',
|
||||
'email_verified_at' => now(),
|
||||
'password' => bcrypt('payload10'),
|
||||
]);
|
||||
|
||||
$this->comment('Done');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user