Skip to content

Structure

Alexis Wurth edited this page Jan 24, 2018 · 14 revisions

Your application's assets (CSS/SASS, JS, etc.)

Binary or executable files

This is where you can configure your application before the handling of a request. You can configure your database connections, declare services in the container, define your database schema, etc.

container.php This is where you can register services in the container
controllers.php Here you can declare your controllers in the container (for simpler routing or using a controller as a service)
handlers.php Customize error handlers here
middleware.php Add global middleware here (middleware that will be executed at the beginning of all requests)
routes.php Put your application routes (or include routing files) here
sentinel.php Cartalyst Sentinel authentication library configuration file
services.php Your application's configuration
services.dev.php Development environment configuration
slim.php Slim settings

All resources accessible by a web browser should be put in this folder (CSS, Javascript, images, etc.)

Your apllication's source code.

Twig templates.

Functional tests with PHPUnit.

Files that are generated by PHP (cache, logs, etc.)

If you're having trouble setting the permissions for the var/ folder, this may help: https://symfony.com/doc/current/setup/file_permissions.html

Clone this wiki locally