mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-19 20:44:03 +00:00
8a28eb1790
This reverts merge request !5
67 lines
1.9 KiB
PHP
67 lines
1.9 KiB
PHP
<?php
|
|
|
|
use App\Classes\ValueObjects\Constants\UserRoles;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Support\Facades\Hash;
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class CreateUserTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up(): void {
|
|
|
|
$faker = \Faker\Factory::create();
|
|
|
|
Schema::create('users', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
$table->string('first_name', 60);
|
|
$table->string('last_name', 60);
|
|
$table->string('email')->unique();
|
|
$table->string('password');
|
|
$table->integer('verified')->nullable()->default(0);
|
|
$table->integer('role_id');
|
|
$table->rememberToken();
|
|
$table->timestamps();
|
|
});
|
|
|
|
DB::table('users')->insert(
|
|
[
|
|
'first_name' => 'Omair',
|
|
'last_name' => 'Saleh',
|
|
'email' => 'omair@izyim.com',
|
|
'password' => Hash::make('123456abcabc'),
|
|
'verified' => 1,
|
|
'role_id' => UserRoles::SUPER_ADMIN,
|
|
'created_at' => \Carbon\Carbon::now(),
|
|
'updated_at' => \Carbon\Carbon::now()
|
|
],
|
|
[
|
|
'first_name' => 'Development',
|
|
'last_name' => 'User',
|
|
'email' => env('EMAIL_DEVELOPMENT', 'dev@izyim.com'),
|
|
'password' => Hash::make('123456abcabc'),
|
|
'verified' => 1,
|
|
'role_id' => UserRoles::ADMIN,
|
|
'created_at' => \Carbon\Carbon::now(),
|
|
'updated_at' => \Carbon\Carbon::now()
|
|
]
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('user');
|
|
}
|
|
}
|