6: The example app

The phlo-demo-cms repository is a blog/magazine on SQLite, built to be copied.

6.1: What is in it

6.2: One-command setup

composer install -d data/     # Faker, used only by the seeder
php www/app.php seed::run      # create tables + ~30 articles with comments

seed::run drops and recreates every table, so it is always safe to start over. The first HTTP request compiles the sources automatically.

6.3: Make it yours

Copy the repository, replace the models in modules/, update %app->models and %app->menu, and adjust the CREATE TABLE statements in seed.phlo to match. Remember the relation-column convention from the Relations chapter: the foreign key is the related model's short name.

We gebruiken essentiële cookies om deze site te laten werken. Met uw toestemming gebruiken we ook analytics om de site te verbeteren.