dtkahl / slim-skeleton
This package is abandoned and no longer maintained.
No replacement package was suggested.
A Slim Framework skeleton application for rapid development
4.0.3
2018-02-15 15:07 UTC
Requires
- php: >=7.0.0
- dtkahl/php-file-cache: ^1.3
- dtkahl/php-simple-config: ^1.1
- illuminate/database: ^5.4
- mnapoli/silly: 1.5.*
- mnapoli/silly-php-di: ^1.1
- monolog/monolog: ^1.17
- php-di/slim-bridge: ^1.0
- slim/slim: ^3.1
- slim/twig-view: ^2.2
- vlucas/phpdotenv: ^2.4
README
Use this skeleton application for the slim 3 micro-framework with some pre configured dependencies and structures:
- Twig as View engine
- Eloquent as ORM for database work
- Monolog for logging
- PHP DI for dependency injection
- Silly CLI micro-framework for CLI Commands
- vlucas/phpdotenv to load environment configuration from ".env" file
- dtkahl/php-simple-config for simple access to configuration files
- dtkahl/php-file-cache as simple file cache
- Webpack to bundle assets and build SCSS
- Controller, Middleware and Factory classes
- Exception handling
- Maintenance mode
If you don't need all of this, you should just use slimphp/Slim-Skeleton which I forked and extended with this features.
Requirements
- PHP >= 7.0
- Composer
- NodeJS (for Webpack)
Install the Application
Run this command from the directory in which you want to install your new Slim Framework application.
composer create-project dtkahl/slim-skeleton [my-app-name]
Replace [my-app-name]
with the desired directory name for your new application. You'll want to:
- Point your virtual host document root to your new application's
public/
directory. - Ensure
storage/
is web writeable. - create a copy ".env" of the file ".env.example" an set up your configuration
Install NodeJS dependencies:
npm install
Development
for development you can use the PHP built-in webserver:
php -S 0.0.0.0:8080 -t public index.php
And let webpack bundle your assets live:
npm run watch
On Production
Make sure to bundle your assets after clone/update your assets on production by running:
npm run build