# Slim **Repository Path**: chao1113_admin/Slim ## Basic Information - **Project Name**: Slim - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: 4.x - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-09-08 - **Last Updated**: 2025-09-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Slim Framework [![Build Status](https://github.com/slimphp/Slim/actions/workflows/tests.yml/badge.svg?branch=4.x)](https://github.com/slimphp/Slim/actions/workflows/tests.yml?query=branch:4.x) [![Coverage Status](https://coveralls.io/repos/github/slimphp/Slim/badge.svg?branch=4.x)](https://coveralls.io/github/slimphp/Slim?branch=4.x) [![Total Downloads](https://poser.pugx.org/slim/slim/downloads)](https://packagist.org/packages/slim/slim) [![License](https://poser.pugx.org/slim/slim/license)](https://packagist.org/packages/slim/slim) 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](https://getcomposer.org/) to install Slim. ```bash $ composer require slim/slim ``` This will install Slim and all required dependencies. Slim requires PHP 7.4 or newer. ## Choose a PSR-7 Implementation & ServerRequest Creator Before you can get up and running with Slim you will need to choose a PSR-7 implementation that best fits your application. A few notable ones: - [Slim-Psr7](https://github.com/slimphp/Slim-Psr7) - This is the Slim Framework PSR-7 implementation - [httpsoft/http-message](https://github.com/httpsoft/http-message) & [httpsoft/http-server-request](https://github.com/httpsoft/http-server-request) - This is the fastest, strictest and most lightweight implementation available - [Nyholm/psr7](https://github.com/Nyholm/psr7) & [Nyholm/psr7-server](https://github.com/Nyholm/psr7-server) - Performance is almost the same as the HttpSoft implementation - [Guzzle/psr7](https://github.com/guzzle/psr7) - This is the implementation used by the Guzzle Client, featuring extra functionality for stream and file handling - [laminas-diactoros](https://github.com/laminas/laminas-diactoros) - This is the Laminas (Zend) PSR-7 implementation ## Slim-Http Decorators [Slim-Http](https://github.com/slimphp/Slim-Http) is a set of decorators for any PSR-7 implementation that we recommend is used with Slim Framework. To install the Slim-Http library simply run the following command: ```bash composer require slim/http ``` The `ServerRequest` and `Response` object decorators are automatically detected and applied by the internal factories. If you have installed Slim-Http and wish to turn off automatic object decoration then you can use the following statements: ```php addErrorMiddleware(true, true, true); // Add routes $app->get('/', function (Request $request, Response $response) { $response->getBody()->write('Try /hello/world'); return $response; }); $app->get('/hello/{name}', function (Request $request, Response $response, $args) { $name = $args['name']; $response->getBody()->write("Hello, $name"); return $response; }); $app->run(); ``` You may quickly test this using the built-in PHP server: ```bash $ php -S localhost:8000 -t public ``` 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](https://www.slimframework.com/docs/v4/start/web-servers.html). ## Tests To execute the test suite, you'll need to install all development dependencies. ```bash $ git clone https://github.com/slimphp/Slim $ composer install $ composer test ``` ## Contributing Please see [CONTRIBUTING](CONTRIBUTING.md) for details. ## Learn More Learn more at these links: - [Website](https://www.slimframework.com) - [Documentation](https://www.slimframework.com/docs/v4/start/installation.html) - [Slack](https://slimphp.slack.com) - [Support Forum](https://discourse.slimframework.com) - [Twitter](https://twitter.com/slimphp) - [Resources](https://github.com/xssc/awesome-slim) ## Security If you discover security related issues, please email security@slimframework.com instead of using the issue tracker. ## For enterprise Available as part of the Tidelift Subscription. The maintainers of `Slim` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-slim-slim?utm_source=packagist-slim-slim&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) ## Contributors ### Code Contributors This project exists thanks to all the people who contribute. [Contribute](CONTRIBUTING.md). ### Financial Contributors Become a financial contributor and help us sustain our community. [Contribute](https://opencollective.com/slimphp/contribute) #### Individuals #### Organizations Support this project with your organization. Your logo will show up here with a link to your website. [Contribute](https://opencollective.com/slimphp/contribute) ## License The Slim Framework is licensed under the MIT license. See [License File](LICENSE.md) for more information.