ansas / slim
Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs
Fund package maintenance!
Open Collective
Requires
- php: ^7.2 || ^8.0
- ext-json: *
- nikic/fast-route: ^1.3
- psr/container: ^1.0 || ^2.0
- psr/http-factory: ^1.0
- psr/http-message: ^1.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- psr/log: ^1.1
Requires (Dev)
- ext-simplexml: *
- adriansuter/php-autoload-override: ^1.2
- guzzlehttp/psr7: ^1.8
- http-interop/http-factory-guzzle: ^1.0
- laminas/laminas-diactoros: ^2.4
- nyholm/psr7: ^1.4
- nyholm/psr7-server: ^1.0.1
- phpspec/prophecy: ^1.13
- phpstan/phpstan: ^0.12.85
- phpunit/phpunit: ^8.5.13 || ^9.3.8
- slim/http: ^1.2
- slim/psr7: ^1.3
- squizlabs/php_codesniffer: ^3.6
- weirdan/prophecy-shim: ^1.0 || ^2.0.2
Suggests
- ext-simplexml: Needed to support XML format in BodyParsingMiddleware
- ext-xml: Needed to support XML format in BodyParsingMiddleware
- php-di/php-di: PHP-DI is the recommended container library to be used with Slim
- slim/psr7: Slim PSR-7 implementation. See https://www.slimframework.com/docs/v4/start/installation.html for more information.
- dev-main
- 4.x-dev
- 4.8.0
- 4.7.1
- 4.7.0
- 4.6.0
- 4.5.0
- 4.4.0
- 4.3.0
- 4.2.0
- 4.1.0
- 4.0.0
- 4.0.0-beta
- 4.0.0-alpha
- 3.x-dev
- 3.12.4
- 3.12.3
- 3.12.2
- 3.12.1
- 3.12.0
- 3.11.0
- 3.10.0
- 3.9.2
- 3.9.1
- 3.9.0
- 3.8.1
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.2
- 3.4.1
- 3.4.0
- 3.3.0
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.0
- 3.0.0
- 3.0.0-RC3
- 3.0.0-RC2
- 3.0.0-RC1
- 3.0.0-beta2
- 3.0.0-beta1
- 2.6.3
- 2.6.2
- 2.6.1
- 2.6.0
- 2.5.0
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.0
- 1.6.7
- 1.6.6
- 1.6.5
- 1.6.4
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6.0
This package is auto-updated.
Last update: 2024-11-21 22:06:56 UTC
README
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->getBody()->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.
Professional support
Slim is part of Tidelift which gives software development teams a single source for purchasing and maintaining their software, with professional grade assurances from the experts who know it best, while seamlessly integrating with existing tools.
Contributors
Code Contributors
This project exists thanks to all the people who contribute. Contribute.
Financial Contributors
Become a financial contributor and help us sustain our community. Contribute
Individuals
Organizations
Support this project with your organization. Your logo will show up here with a link to your website. Contribute
License
The Slim Framework is licensed under the MIT license. See License File for more information.