mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
wiki features
This commit is contained in:
74
ci4/app/Database/Seeds/WikiSectionSeeder.php
Normal file
74
ci4/app/Database/Seeds/WikiSectionSeeder.php
Normal file
@ -0,0 +1,74 @@
|
||||
<?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 $data = [
|
||||
[
|
||||
"name" => 'Introducción',
|
||||
"slug" => 'intro',
|
||||
"icon" => 'ti ti-home-2'
|
||||
],
|
||||
[
|
||||
"name" => 'Presupuesto',
|
||||
"slug" => 'presupuesto-administrador',
|
||||
"icon" => 'ti ti-currency-dollar'
|
||||
],
|
||||
[
|
||||
"name" => 'Presupuesto cliente',
|
||||
"slug" => 'presupuesto-cliente',
|
||||
"role" => 'cliente',
|
||||
"icon" => 'ti ti-currency-dollar'
|
||||
],
|
||||
[
|
||||
"name" => 'Pedidos',
|
||||
"slug" => 'pedidos',
|
||||
"icon" => 'ti ti-file-description'
|
||||
|
||||
],
|
||||
[
|
||||
"name" => 'Facturación',
|
||||
"slug" => 'facturacion',
|
||||
"icon" => 'ti ti-file-dollar'
|
||||
|
||||
],
|
||||
[
|
||||
"name" => 'Logística',
|
||||
"slug" => 'logistica',
|
||||
"icon" => 'ti ti-truck'
|
||||
|
||||
],
|
||||
[
|
||||
"name" => 'Tarifas',
|
||||
"slug" => 'tarifas',
|
||||
"icon" => 'ti ti-receipt'
|
||||
|
||||
],
|
||||
[
|
||||
"name" => 'Configuración',
|
||||
"slug" => 'config',
|
||||
"icon" => 'ti ti-adjustments-horizontal'
|
||||
|
||||
],
|
||||
[
|
||||
"name" => 'Mensajería',
|
||||
"slug" => 'messages',
|
||||
"icon" => 'ti ti-message'
|
||||
|
||||
]
|
||||
];
|
||||
public function run()
|
||||
{
|
||||
|
||||
$wikiSectionModel = model(WikiSectionModel::class);
|
||||
foreach ($this->data as $key => $row) {
|
||||
# code...
|
||||
$wikiSectionModel->insert($row);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user