samheuck / silex-scaffold

A good starting point for a silex app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Silex Scaffold

A good starting point for a Silex application.

Built with Flint for better performance.

Requirements

  • php >5.4 (5.5 recommended)
  • composer
  • phpunit
  • xdebug

Setup

  1. composer install
  2. make app/var/cache writable
  3. make app/var/logs writable
  4. configure database credentials (app/config/database.yml)
  5. app/cli schema:sync
  6. serve index.php out of app/webroot

Usage

Add routes in app/config/routes.yml - see Symfony Routing for ref.

Add templates and template namespaces in app/config/twig.yml.

Create modules in app/src that group controllers and supporting class structures by following PSR-4 conventions. Composer will set up the autoloader for you.

Create your own service providers and inject them into the Pimple container.

Silex is meant to be flexible - use a structure that makes sense for your problem domain.

Doctrine2 DBAL is used for queries.

About

A good starting point for a silex app


Languages

Language:PHP 96.9%Language:HTML 1.8%Language:ApacheConf 1.3%