firstcommit
This commit is contained in:
0
Modules/AdminUser/database/factories/.gitkeep
Normal file
0
Modules/AdminUser/database/factories/.gitkeep
Normal file
0
Modules/AdminUser/database/migrations/.gitkeep
Normal file
0
Modules/AdminUser/database/migrations/.gitkeep
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('admin_users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->uuid();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
$table->string('status')->default('active'); // Adding the status column
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('admin_users');
|
||||
}
|
||||
};
|
0
Modules/AdminUser/database/seeders/.gitkeep
Normal file
0
Modules/AdminUser/database/seeders/.gitkeep
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\AdminUser\database\seeders;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Modules\AdminUser\app\Models\AdminUser;
|
||||
|
||||
class AdminUserDatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$userAdmin = AdminUser::create([
|
||||
'uuid' => Str::uuid(),
|
||||
'name' => 'Administrator',
|
||||
'email' => 'arogin@gmail.com',
|
||||
'password' => bcrypt('secret123!@#'),
|
||||
'remember_token' => '',
|
||||
'status' => 'active',
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user