https://github.com/php-casbin/casbin-with-slim
Casbin skeleton application with Slim Framework 4.
https://github.com/php-casbin/casbin-with-slim
authorization casbin middleware permission rbac roles skeleton
Last synced: 4 months ago
JSON representation
Casbin skeleton application with Slim Framework 4.
- Host: GitHub
- URL: https://github.com/php-casbin/casbin-with-slim
- Owner: php-casbin
- License: apache-2.0
- Created: 2019-09-23T09:46:49.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-12-26T04:54:10.000Z (9 months ago)
- Last Synced: 2025-05-12T15:45:35.309Z (5 months ago)
- Topics: authorization, casbin, middleware, permission, rbac, roles, skeleton
- Language: PHP
- Size: 182 KB
- Stars: 9
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Casbin skeleton application with Slim Framework 4
[](https://github.com/php-casbin/casbin-with-slim/actions/workflows/phpunit.yml)
[](https://coveralls.io/github/php-casbin/casbin-with-slim)
[](https://packagist.org/packages/casbin/casbin-with-slim)
[](https://packagist.org/packages/casbin/casbin-with-slim)
[](https://packagist.org/packages/casbin/casbin-with-slim)Use this skeleton application to quickly setup and start working on a new Slim Framework 4 application. This application uses the latest Slim 4 with Slim PSR-7 implementation and PHP-DI container implementation. It also uses the Monolog logger.
This skeleton application was built for Composer. This makes setting up a new [Casbin](https://github.com/php-casbin/casbin-with-slim) skeleton application with Slim Framework quick and easy.
## Install the Application
Run this command from the directory in which you want to install your new Slim Framework application.
```bash
composer create-project casbin/casbin-with-slim [my-app-name]
```Replace `[my-app-name]` with the desired directory name for your new application. You'll want to:
* Point your virtual host document root to your new application's `public/` directory.
* Ensure `logs/` is web writable.To run the application in development, you can run these commands
```bash
cd [my-app-name]
composer start
```Or you can use PHP Built-in web server:
```
php -S localhost:8888 -t public
```Or you can use `docker-compose` to run the app with `docker`, so you can run these commands:
```bash
cd [my-app-name]
docker-compose up -d
```
After that, open `http://localhost:8888` in your browser.Run this command in the application directory to run the test suite
```bash
composer test
```That's it! Now go build something cool.