miscellaneous updates
This commit is contained in:
@ -1,14 +1,14 @@
|
||||
name,email,role
|
||||
Administrador Web,webadmin@concierge.test,Administrador Web
|
||||
Productos y servicios,productos@concierge.test,Productos y servicios
|
||||
Recursos humanos,rrhh@concierge.test,Recursos humanos
|
||||
Nómina,nomina@concierge.test,Nómina
|
||||
Activos fijos,activos@concierge.test,Activos fijos
|
||||
Compras y gastos,compras@concierge.test,Compras y gastos
|
||||
CRM,crm@concierge.test,CRM
|
||||
Vendedor,vendedor@concierge.test,Vendedor
|
||||
Gerente,gerente@concierge.test,Gerente
|
||||
Facturación,facturacion@concierge.test,Facturación
|
||||
Facturación avanzado,facturacion_avanzado@concierge.test,Facturación avanzado
|
||||
Finanzas,finanzas@concierge.test,Finanzas
|
||||
Auditor,auditor@concierge.test,Auditor
|
||||
name,email,role,password
|
||||
Administrador Web,webadmin@concierge.test,Administrador Web,LAdmin123
|
||||
Productos y servicios,productos@concierge.test,Productos y servicios,LAdmin123
|
||||
Recursos humanos,rrhh@concierge.test,Recursos humanos,LAdmin123
|
||||
Nómina,nomina@concierge.test,Nómina,LAdmin123
|
||||
Activos fijos,activos@concierge.test,Activos fijos,LAdmin123
|
||||
Compras y gastos,compras@concierge.test,Compras y gastos,LAdmin123
|
||||
CRM,crm@concierge.test,CRM,LAdmin123
|
||||
Vendedor,vendedor@concierge.test,Vendedor,LAdmin123
|
||||
Gerente,gerente@concierge.test,Gerente,LAdmin123
|
||||
Facturación,facturacion@concierge.test,Facturación,LAdmin123
|
||||
Facturación avanzado,facturacion_avanzado@concierge.test,Facturación avanzado,LAdmin123
|
||||
Finanzas,finanzas@concierge.test,Finanzas,LAdmin123
|
||||
Auditor,auditor@concierge.test,Auditor,LAdmin123
|
||||
|
|
@ -10,7 +10,7 @@ class AdminDatabaseSeeder extends Seeder
|
||||
{
|
||||
$this->call(RoleSeeder::class);
|
||||
$this->call(UserSeeder::class);
|
||||
$this->call(SettingSeeder::class);
|
||||
//$this->call(SettingSeeder::class);
|
||||
$this->call(SATCatalogsSeeder::class);
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,6 @@ class SettingSeeder extends Seeder
|
||||
public function run()
|
||||
{
|
||||
$settings_array = [
|
||||
/*
|
||||
'app_title' => 'Quimiplastic S.A de C.V.',
|
||||
'app_faviconIcon' => '../assets/img/logo/koneko-02.png',
|
||||
'app_name' => 'Quimiplastic',
|
||||
@ -96,7 +95,7 @@ class SettingSeeder extends Seeder
|
||||
'chat.whatsapp.message' => '👋 Hola! Estoy buscando más información sobre Covirsa Soluciones en Tecnología. ¿Podrías proporcionarme los detalles que necesito? ¡Te lo agradecería mucho! 💻✨',
|
||||
|
||||
'webTpl.container' => 'custom-container',
|
||||
*/];
|
||||
];
|
||||
|
||||
foreach ($settings_array as $key => $value) {
|
||||
Setting::create([
|
||||
|
77
modules/Admin/Database/seeders/UserSeeder.php
Normal file
77
modules/Admin/Database/seeders/UserSeeder.php
Normal file
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Database\seeders;
|
||||
|
||||
use Modules\Admin\App\Models\User;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class UserSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// Define el disco y la carpeta
|
||||
$disk = 'public';
|
||||
$directory = 'profile-photos';
|
||||
|
||||
// Verifica si la carpeta existe
|
||||
if (Storage::disk($disk)->exists($directory))
|
||||
Storage::disk($disk)->deleteDirectory($directory);
|
||||
|
||||
// Arturo Corro
|
||||
$user = User::create([
|
||||
'name' => 'Koneko Admin',
|
||||
'email' => 'admin@koneko.mx',
|
||||
'email_verified_at' => now(),
|
||||
'password' => bcrypt('LAdmin123'),
|
||||
'status' => User::STATUS_ENABLED,
|
||||
])->assignRole('SuperAdmin');
|
||||
|
||||
$user->updateProfilePhoto(new UploadedFile(
|
||||
'public/assets/img/logo/koneko-02.png',
|
||||
'koneko-02.png'
|
||||
));
|
||||
|
||||
|
||||
// Webmaster admin
|
||||
$user = User::create([
|
||||
'name' => 'Admin',
|
||||
'email' => 'servers@koneko.mx',
|
||||
'email_verified_at' => now(),
|
||||
'password' => bcrypt('LAdmin123'),
|
||||
'status' => User::STATUS_ENABLED,
|
||||
])->assignRole('Admin');
|
||||
|
||||
$user->updateProfilePhoto(new UploadedFile(
|
||||
'public/assets/img/logo/koneko-03.png',
|
||||
'koneko-03.png'
|
||||
));
|
||||
|
||||
// Usuarios CSV
|
||||
$csvFile = fopen(base_path("modules/Admin/Database/data/users.csv"), "r");
|
||||
|
||||
$firstline = true;
|
||||
|
||||
while (($data = fgetcsv($csvFile, 2000, ",")) !== FALSE) {
|
||||
if (!$firstline) {
|
||||
User::create([
|
||||
'name' => $data['0'],
|
||||
'email' => $data['1'],
|
||||
'email_verified_at' => now(),
|
||||
'password' => bcrypt($data['3']),
|
||||
'status' => User::STATUS_ENABLED,
|
||||
])->assignRole($data['2']);
|
||||
}
|
||||
|
||||
$firstline = false;
|
||||
}
|
||||
|
||||
fclose($csvFile);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user