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.

我们使用必要的cookie来使该网站正常工作。在您的许可下,我们还使用分析工具来改善网站。