This is a simple skeleton project for Slim 3 that includes FluentPDO, Twig and Monolog.
Base on https://github.com/vhchung/slim3-skeleton-mvc
-
Create your project:
`$ composer create-project -n -s dev mrmoneyc/slim-mvc-skeleton YOUR_APP_NAME`
-
Create database:
$ cat sql/db.sql | sqlite3 storage/db/db.sqlite
$ cd YOUR_APP_NAME
$ php -S 0.0.0.0:8888 -t public/
- Browse to http://localhost:8888
- Install [PHP_CodeSniffer] (https://github.com/squizlabs/PHP_CodeSniffer)
$ cd YOUR_APP_NAME
$ phpcs
- Install [PHPUnit] (https://phpunit.de/)
$ cd YOUR_APP_NAME
$ phpunit
Set storage/
folder permission to writable when deploy to production environment
app
: Application codeapp/controllers
: Controller filesapp/models
: Model filesapp/templates
: Template filesstorage/log
: Log filesstorage/db
: SQLite DB filespublic
: Webserver rootvendor
: Composer dependenciessql
: sql dump file for sample database
public/index.php
: Entry point to applicationapp/settings.php
: Configurationapp/dependencies.php
: Services for Pimpleapp/middleware.php
: Application middlewareapp/routes.php
: All application routes are hereapp/controllers/IndexController.php
: Controller class for the home pageapp/models/ConfigurationModel.php
: Model class for configurations tableapp/templates/index.twig
: Template file for the home page