433c15a183
- Migration: add 'group' and 'description' columns to the permissions table. - PermissionCatalogSeeder (idempotent updateOrCreate): full catalogue across 11 sections — Proyectos, Fases y progreso, Capas y elementos, Inspecciones, Incidencias, Empresas, Usuarios, Roles, Informes, Archivos, General. Sets group + description on existing and creates the new ones; does NOT touch role assignments. Registered in DatabaseSeeder. - RoleView: group permission toggles by the 'group' column in a defined section order and show each permission's description. DB updated locally (migrate + seed run). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
33 lines
653 B
PHP
33 lines
653 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class DatabaseSeeder extends Seeder
|
|
{
|
|
use WithoutModelEvents;
|
|
|
|
/**
|
|
* Seed the application's database.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
// User::factory(10)->create();
|
|
|
|
/*User::factory()->create([
|
|
'name' => 'Test User',
|
|
'email' => 'test@example.com',
|
|
]);*/
|
|
|
|
|
|
$this->call([
|
|
RolesAndPermissionsSeeder::class,
|
|
PermissionCatalogSeeder::class,
|
|
ProjectExampleSeeder::class,
|
|
]);
|
|
}
|
|
}
|