mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
106 lines
2.8 KiB
PHP
106 lines
2.8 KiB
PHP
<?php
|
|
|
|
namespace App\Database\Seeds;
|
|
|
|
use App\Models\Configuracion\ConfigVariableModel;
|
|
use App\Models\Wiki\WikiSectionModel;
|
|
use CodeIgniter\Database\Seeder;
|
|
|
|
class WikiSectionSeeder extends Seeder
|
|
{
|
|
protected array $dataAdmin = [
|
|
[
|
|
"name" => 'Introducción',
|
|
"slug" => 'intro-admin',
|
|
"icon" => 'ti ti-home-2'
|
|
],
|
|
[
|
|
"name" => 'Presupuesto',
|
|
"slug" => 'presupuesto-admin',
|
|
"icon" => 'ti ti-currency-dollar'
|
|
],
|
|
[
|
|
"name" => 'Pedidos',
|
|
"slug" => 'pedidos-admin',
|
|
"icon" => 'ti ti-file-description'
|
|
|
|
],
|
|
[
|
|
"name" => 'Facturación',
|
|
"slug" => 'facturacion-admin',
|
|
"icon" => 'ti ti-file-dollar'
|
|
|
|
],
|
|
[
|
|
"name" => 'Logística',
|
|
"slug" => 'logistica-admin',
|
|
"icon" => 'ti ti-truck'
|
|
|
|
],
|
|
[
|
|
"name" => 'Tarifas',
|
|
"slug" => 'tarifas-admin',
|
|
"icon" => 'ti ti-receipt'
|
|
|
|
],
|
|
[
|
|
"name" => 'Configuración',
|
|
"slug" => 'config-admin',
|
|
"icon" => 'ti ti-adjustments-horizontal'
|
|
|
|
],
|
|
[
|
|
"name" => 'Mensajería',
|
|
"slug" => 'messages-admin',
|
|
"icon" => 'ti ti-message'
|
|
|
|
]
|
|
];
|
|
protected array $dataCliente = [
|
|
[
|
|
"name" => 'Presupuesto(Cliente)',
|
|
"slug" => 'presupuesto-cliente',
|
|
"role" => 'cliente',
|
|
"icon" => 'ti ti-currency-dollar',
|
|
"role" => 'cliente',
|
|
],
|
|
[
|
|
"name" => 'Pedidos(Cliente)',
|
|
"slug" => 'pedidos-cliente',
|
|
"icon" => 'ti ti-file-description',
|
|
"role" => 'cliente',
|
|
],
|
|
[
|
|
"name" => 'Facturación (Cliente)',
|
|
"slug" => 'facturacion-cliente',
|
|
"icon" => 'ti ti-file-dollar',
|
|
"role" => 'cliente',
|
|
],
|
|
[
|
|
"name" => 'Tarifas (Cliente)',
|
|
"slug" => 'tarifas-cliente',
|
|
"icon" => 'ti ti-receipt',
|
|
"role" => 'cliente',
|
|
],
|
|
[
|
|
"name" => 'Mensajería (Cliente)',
|
|
"slug" => 'messages-cliente',
|
|
"icon" => 'ti ti-message',
|
|
"role" => 'cliente',
|
|
]
|
|
];
|
|
public function run()
|
|
{
|
|
|
|
$wikiSectionModel = model(WikiSectionModel::class);
|
|
foreach ($this->dataAdmin as $key => $row) {
|
|
# code...
|
|
$wikiSectionModel->insert($row);
|
|
}
|
|
foreach ($this->dataCliente as $key => $row) {
|
|
# code...
|
|
$wikiSectionModel->insert($row);
|
|
}
|
|
}
|
|
}
|