2017 © Pedro Peláez
 

library slim-app-template

Simple application folder structure and bootstrapping for quickly getting started with Slim framework

image

maer/slim-app-template

Simple application folder structure and bootstrapping for quickly getting started with Slim framework

  • Monday, July 13, 2015
  • by maer
  • Repository
  • 1 Watchers
  • 1 Stars
  • 31 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Slim Application Template

Simple application folder structure and bootstrapping for quickly getting started with Slim framework., (*1)

Requirements

Installation

$ composer create-project maer/slim-app-template

Setup

There are two config files: * app/config.global.php - Here you can see and change all default config parameters for Slim. This file will be sent to Slim on instantiation as the config file. So this is basically where you configure Slim. * app/config.env.php - If you want to change some parameters depending on the environment/server, you can override those parameters here. You should probably add this file to .gitignore so different developers/servers can have their own settings., (*2)

I've added the Illuminate\Container to this package to be able to handle dependency injection., (*3)

There is also a file called app/start.php which is included right before the routes are called. This would be a good place to register classes for dependency injection and bootstrap other packages you're using., (*4)

To get the Slim instance, use the helper slim()., (*5)

File structure

app/
    Controllers/
    templates/
    config.env.php
    config.global.php
    routes.php
    start.php
 helpers/
    core.php
    misc.php
idefix/
    App.php
public/
    .htaccess
    index.php

Conclusion

This is by no means any "best-practice" structure. I made it to be able to knock out small apps using Slim quickly, and according to the DRY principle, this seemed like a good idea. To see the the order of things, look at the bootstrap.php-file., (*6)

Enjoy and happy coding!, (*7)

The Versions

13/07 2015

dev-master

9999999-dev

Simple application folder structure and bootstrapping for quickly getting started with Slim framework

  Sources   Download

MIT

The Requires

 

by Magnus Eriksson

template slim

25/02 2015

dev-develop

dev-develop

Simple application folder structure and bootstrapping for quickly getting started with Slim framework

  Sources   Download

MIT

The Requires

 

by Magnus Eriksson

template slim

25/02 2015

1.1.0

1.1.0.0

Simple application folder structure and bootstrapping for quickly getting started with Slim framework

  Sources   Download

MIT

The Requires

 

by Magnus Eriksson

template slim

16/10 2014

1.0.0

1.0.0.0

Simple application folder structure and bootstrapping for quickly getting started with Slim framework

  Sources   Download

MIT

The Requires

 

by Magnus Eriksson

template slim