openclassify/database/seeders/DatabaseSeeder.php
fatihalp 7e9d77c0a8 feat: Implement user profile management and favorites module
- Added routes for user profile management including edit, update, and delete functionalities.
- Created ProfileController to handle profile-related requests.
- Introduced Profile model to manage user profile data.
- Developed user status states (Active, Banned, Suspended) with appropriate labels and descriptions.
- Implemented favorite listings and sellers functionality in the User model.
- Created views for profile editing, updating password, and deleting account.
- Added migration for user and profile tables along with necessary fields.
- Registered User module with service provider and routes.
2026-03-05 01:23:42 +03:00

39 lines
1.2 KiB
PHP

<?php
namespace Database\Seeders;
use Modules\User\App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
use Spatie\Permission\Models\Role;
class DatabaseSeeder extends Seeder
{
public function run(): void
{
$admin = User::updateOrCreate(
['email' => 'a@a.com'],
['name' => 'Admin', 'password' => Hash::make('236330'), 'status' => 'active']
);
$partner = User::updateOrCreate(
['email' => 'b@b.com'],
['name' => 'Partner', 'password' => Hash::make('36330'), 'status' => 'active']
);
if (class_exists(Role::class)) {
$adminRole = Role::firstOrCreate(['name' => 'admin', 'guard_name' => 'web']);
$partnerRole = Role::firstOrCreate(['name' => 'partner', 'guard_name' => 'web']);
$admin->syncRoles([$adminRole->name]);
$partner->syncRoles([$partnerRole->name]);
}
$this->call([
HomeSliderSettingsSeeder::class,
\Modules\Location\Database\Seeders\LocationSeeder::class,
\Modules\Category\Database\Seeders\CategorySeeder::class,
\Modules\Listing\Database\Seeders\ListingSeeder::class,
]);
}
}