Skip to content
Slim Framework source code
PHP ApacheConf
Branch: 3.x
Clone or download
Pull request Compare This branch is 312 commits behind slimphp:3.x.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Slim Merge branch 'mathmarques-allow-all-http-valid-methods-3.x' into 3.x Apr 17, 2017
example Add README for example. May 7, 2016
tests
.codeclimate.yml Update .codeclimate.yml Jun 21, 2015
.coveralls.yml Whitespace cleanup Oct 11, 2016
.editorconfig Adding editorconfig file to help enforce contributor guidelines Feb 9, 2016
.gitattributes Update .gitattributes Sep 23, 2016
.gitignore Add Coveralls config file Jun 17, 2015
.travis.yml Fix travis Mar 21, 2017
CONTRIBUTING.md Add contributing file Jul 16, 2013
LICENSE.md Update copyright year to 2017 Jan 3, 2017
README.md Fixed README badges Mar 21, 2017
composer.json Using stable PSR-11 release Feb 15, 2017
phpcs.xml Add phpcs.xml Jan 1, 2016
phpunit.xml.dist Remove syntax check and add strict flags Aug 2, 2015

README.md

Slim Framework

Build Status Coverage Status Total Downloads License

Slim is a PHP micro-framework that helps you quickly write simple yet powerful web applications and APIs.

Installation

It's recommended that you use Composer to install Slim.

$ composer require slim/slim "^3.0"

This will install Slim and all required dependencies. Slim requires PHP 5.5.0 or newer.

Usage

Create an index.php file with the following contents:

<?php

require 'vendor/autoload.php';

$app = new Slim\App();

$app->get('/hello/{name}', function ($request, $response, $args) {
    return $response->write("Hello, " . $args['name']);
});

$app->run();

You may quickly test this using the built-in PHP server:

$ php -S localhost:8000

Going to http://localhost:8000/hello/world will now display "Hello, world".

For more information on how to configure your web server, see the Documentation.

Tests

To execute the test suite, you'll need phpunit.

$ phpunit

Contributing

Please see CONTRIBUTING for details.

Learn More

Learn more at these links:

Security

If you discover security related issues, please email security@slimframework.com instead of using the issue tracker.

Credits

License

The Slim Framework is licensed under the MIT license. See License File for more information.

You can’t perform that action at this time.