2017 © Pedro PelĂĄez
 

project slim3-skeleton-mvc-sqlite

Simple Slim Framework 3 skeleton with Twig, Monolog, Doctrine in Sqlite.

image

agustim/slim3-skeleton-mvc-sqlite

Simple Slim Framework 3 skeleton with Twig, Monolog, Doctrine in Sqlite.

  • Friday, March 11, 2016
  • by agusti
  • Repository
  • 1 Watchers
  • 0 Stars
  • 66 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 5 % Grown

The README.md

Slim 3 MVC Skeleton

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

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

Prepare

  1. Create your project:, (*3)

    $ composer create-project -n -s dev agustim/slim3-skeleton-mvc-sqlite your-app, (*4)

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

  3. Generate models (Doctrine entities):

$ cd your-app $ php entities_generator.php

Add namespace for each model: namespace App\Model;, (*6)

Notice: Delete all models before re-generate to update models., (*7)

Run it:

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

Notice

Set logs and cache folder permission to writable when deploy to production environment, (*8)

Key directories

  • app: Application code
  • app/src: All class files within the App namespace
  • app/templates: Twig template files
  • cache/twig: Twig's Autocreated cache files
  • log: Log 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/src/controllers/HomeController.php: Controller class for the home page
  • app/src/models/Post.php: Entity class for post table
  • app/templates/home.twig: Twig template file for the home page

The Versions

11/03 2016

dev-master

9999999-dev

Simple Slim Framework 3 skeleton with Twig, Monolog, Doctrine in Sqlite.

  Sources   Download

MIT

The Requires

 

skeleton mvc slim-framework sqlite