Slim Framework 3 skeleton application
Clone or download
Pull request Compare This branch is 12 commits ahead, 24 commits behind slimphp:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
config
public Update index.php Aug 24, 2017
resources
storage
.env.example
.gitignore
README.md
cli.php #no-ticket Jun 4, 2017
composer.json
package.json
webpack.config.js

README.md

Slim Framework 3 Skeleton Application

Use this skeleton application for the slim 3 micro-framework with some pre configured dependencies and structures:

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