Slim 4 Skeleton

This is a skeleton for a web application that uses the Slim 4 Framework.

PSR-7 implementation

By default this project uses the Nyholm PSR-7 implementation. But you are free to use any other PSR-7 implementation. Just modify the composer.json file. The two packages are nyholm/psr7 and nyholm/psr7-server.

Dependency injection

By default this project uses the PHP-DI package to build a Container for dependency injection.

Slim Twig extension

Code Result
url_for('hello', {'name': 'foo'}) /hello/foo
full_url_for('home') https://archive.diversifiedrecoverysolutions.net/
is_current_url('home') TRUE
current_url() /
get_uri().scheme https

Filesystem

The root path for this project is /home/dctf/public_html/archive/private.