2017 © Pedro Peláez
 

project slim-mvc-skeleton

Slim Framework 3 skeleton.

image

mrmoneyc/slim-mvc-skeleton

Slim Framework 3 skeleton.

  • Thursday, May 26, 2016
  • by mrmoneyc
  • Repository
  • 2 Watchers
  • 2 Stars
  • 54 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 8 % Grown

The README.md

Slim 3 MVC Skeleton

This is a simple skeleton project for Slim 3 that includes FluentPDO, Twig and Monolog., (*1)

Base on https://github.com/vhchung/slim3-skeleton-mvc, (*2)

Prepare

  1. Create your project:, (*3)

    $ composer create-project -n -s dev mrmoneyc/slim-mvc-skeleton YOUR_APP_NAME, (*4)

  2. Create database: $ cat sql/db.sql | sqlite3 storage/db/db.sqlite, (*5)

Run it:

  1. $ cd YOUR_APP_NAME
  2. $ php -S 0.0.0.0:8888 -t public/
  3. Browse to http://localhost:8888

Run coding style check

  1. Install [PHP_CodeSniffer] (https://github.com/squizlabs/PHP_CodeSniffer)
  2. $ cd YOUR_APP_NAME
  3. $ phpcs

Run test

  1. Install [PHPUnit] (https://phpunit.de/)
  2. $ cd YOUR_APP_NAME
  3. $ phpunit

Notice

Set storage/ folder permission to writable when deploy to production environment, (*6)

Key directories

  • app: Application code
  • app/controllers: Controller files
  • app/models: Model files
  • app/templates: Template files
  • storage/log: Log files
  • storage/db: SQLite DB files
  • public: Webserver root
  • vendor: Composer dependencies
  • sql: sql dump file for sample database

Key files

  • public/index.php: Entry point to application
  • app/settings.php: Configuration
  • app/dependencies.php: Services for Pimple
  • app/middleware.php: Application middleware
  • app/routes.php: All application routes are here
  • app/controllers/IndexController.php: Controller class for the home page
  • app/models/ConfigurationModel.php: Model class for configurations table
  • app/templates/index.twig: Template file for the home page

The Versions

26/05 2016

dev-master

9999999-dev

Slim Framework 3 skeleton.

  Sources   Download

MIT

The Requires

 

skeleton mvc slim-framework sqlite