Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/keving5726/megacreative/llms.txt

Use this file to discover all available pages before exploring further.

Mega Creative uses five lookup tables to normalize repeated values across the database. These tables are seeded at setup time and referenced by foreign keys on student and program records. None of the five tables store timestamps — each model sets public $timestamps = false — keeping them lean and read-friendly in query results.

Statuses

Two values shared by both students and programs: Habilitado and Inhabilitado.

Sex Options

Two values for student sex: Masculino and Femenino.

Countries (Paises)

30 Faker-generated country records seeded at startup.

States & Cities

50 Faker-generated states and 50 cities forming a three-tier geographic hierarchy.

Statuses

The statuses table is seeded by StatusesTableSeeder and contains exactly two rows. The same rows are reused as the status_id foreign key on both the carreras table and the estudiantes table.
idstatusMeaning
1HabilitadoRecord is active / enabled
2InhabilitadoRecord is inactive / disabled
The Status model maps to the statuses table and carries no timestamps:
// app/Status.php
class Status extends Model
{
    protected $table  = 'statuses';
    public $timestamps = false;
}

Sex Options

The sexos table is seeded by SexosTableSeeder and contains exactly two rows. The field name in the table is tipo, which the create/edit Blade views render directly in the dropdown option labels.
idtipo
1Masculino
2Femenino
The Sexo model maps to the sexos table:
// app/Sexo.php
class Sexo extends Model
{
    protected $table  = 'sexos';
    public $timestamps = false;
}

Geographic Data

Three tables form a simple three-tier location hierarchy. Each table exposes a nombre column that the Blade dropdowns display. All three models set public $timestamps = false.
TableModelRows seededSeeder class
paisesPais30PaisesTableSeeder
estadosEstado50EstadosTableSeeder
ciudadesCiudad50CiudadesTableSeeder
Each table’s seeder uses the Laravel model factory with Faker to generate dummy records:
// PaisesTableSeeder
factory(App\Pais::class, 30)->create();

// EstadosTableSeeder
factory(App\Estado::class, 50)->create();

// CiudadesTableSeeder
factory(App\Ciudad::class, 50)->create();
All geographic records are populated with Faker-generated dummy values and do not represent real countries, states, or cities. For a production deployment you should replace the factory-based seeders with real geographic data — for example, sourced from an ISO 3166 dataset or a reputable geocoding API — and update the factory definitions accordingly.

How They Are Seeded

DatabaseSeeder::run() calls all seeders in dependency order. Statuses and sex options come first because programs and students reference them. Geographic tables are populated before students because student records require valid pais_id, estado_id, and ciudad_id values.
// database/seeds/DatabaseSeeder.php

class DatabaseSeeder extends Seeder
{
    public function run()
    {
        $this->call(StatusesTableSeeder::class);
        $this->call(SexosTableSeeder::class);
        $this->call(CarrerasTableSeeder::class);
        $this->call(PaisesTableSeeder::class);
        $this->call(EstadosTableSeeder::class);
        $this->call(CiudadesTableSeeder::class);
        $this->call(EstudiantesTableSeeder::class);
    }
}
To run the seeders against a fresh database:
php artisan migrate:fresh --seed
Or seed without re-migrating:
php artisan db:seed
If you need to re-seed only one table (for example, to swap in real geographic data), you can target a specific seeder class directly:
php artisan db:seed --class=PaisesTableSeeder
Make sure foreign key checks won’t block the operation — truncate child tables first if necessary.

Build docs developers (and LLMs) love