This is a simple example demonstrating Phalcon 5.9 with PHP 8.4 using SQLite database. It shows the relationship between car manufacturers and their car models.
- PHP 8.4
- Phalcon 5.9
- PDO SQLite extension
/app/Models/- Contains the Manufacturer and CarModel models/app/config.php- Database configuration/app/bootstrap.php- Application bootstrap and database initialization/data/- SQLite database locationexample.php- Example script showing queries
- Install dependencies:
composer install- Run the example:
php example.phpThe example demonstrates two ways to query the data:
- Using Phalcon ORM with relationships
- Using raw SQL with joins
The database will be automatically created with sample data when running the example.