fixing missed step

This commit is contained in:
behzad
2022-01-22 21:30:15 +04:00
parent 91f96ceecd
commit cee0f49f32
30 changed files with 330 additions and 73 deletions
+2 -1
View File
@@ -1,5 +1,7 @@
<?php
declare(strict_types = 1);
/*
|--------------------------------------------------------------------------
| Model Factories
@@ -10,4 +12,3 @@
| database. Just tell the factory how a default model should look.
|
*/
@@ -0,0 +1,36 @@
<?php
declare(strict_types = 1);
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up() : void
{
Schema::create('users', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 256);
$table->string('email', 256);
$table->string('password', 512);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() : void
{
Schema::dropIfExists('users');
}
}
+4 -1
View File
@@ -1,5 +1,7 @@
<?php
declare(strict_types = 1);
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
@@ -11,6 +13,7 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
// $this->call('UsersTableSeeder');
\Illuminate\Support\Facades\Artisan::call('passport:install');
$this->call(UserTableSeeder::class);
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
declare(strict_types = 1);
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
class UserTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
\App\User::create([
'name' => 'user1',
'email' => 'user1@gmail.com',
'password' => Hash::make('123456')
]);
}
}