This is an MVC setup for quickly getting started with the Slim Framework version 3. It contains
- the Slim Framework,
- a template system via League/Plates,
- a localization library for displaying localized strings,
- a PSR-3 logger,
- an authentication system, and
- session management via Aura/Session
- Get the most stable without VCS
composer create-project vespula/slim-mvc your/path(the most common method)
- Get the most recent dev version
composer create-project -s dev vespula/slim-mvc your/path
- Get the most stable with VCS
composer create-project --keep-vcs vespula\slim-mvc your/path
- Or just clone or download the repository then run
composer install, then
composer run-script post-create-project-cmd.
If you choose to delete the VCS (.git) info for the project and use your own repository, make sure you modify the
The one that comes with it ignores the src folder, which you might not want to do when going on your own.
If you keep the VCS (.git) info, then you can put new projects created in the
folder under their own version control. The
src folder is ignored by default.
Test the install
After you have your project, you can check that everything is working as expected by running the PHP built-in webserver.
$ cd /var/www/my-project/html $ php -S localhost:8000
Browse to http://localhost:8000/ to see the default welcome app. You can customize the address to your liking.
If you have any issues, the first place to check is :
- is your alias or virtual host set up correctly and pointing to the /slim-mvc/html folder?
- if you have apache mod_rewrite on, check the .htaccess in the html folder and make sure the RewriteBase setting is correct. It may not be by default.