Overview
TheClinica model represents dental clinic entities in the DentControl system. It serves as the primary tenant model for the multi-tenant SaaS architecture, containing clinic information, location details, and branding configuration.
Table Schema
Database table name
Primary key column (auto-incrementing)
Includes
created_at and updated_at columnsFields
Basic Information
Clinic name
Tax identification number (RFC - Registro Federal de Contribuyentes). Unique and nullable.
Address Fields
Street name
External street number
Internal/apartment number
Neighborhood/colony
City
State/province
Postal/ZIP code
Contact & Branding
Primary phone number
File path or URL to clinic logo
Status
Clinic status:
activo or bajaRelationships
usuarios
Type:hasMany
A clinic has many users (dentists, assistants, admins).
id_clinica on usuario table
pacientes
Type:hasMany
A clinic has many patients.
id_clinica on paciente table
Example Usage
Creating a New Clinic
Retrieving Clinic with Relationships
Updating Clinic Information
Model Definition
Location:app/Models/Clinica.php