Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mathleite/simple-php-router
Simple router usage with PHP7.4, Docker, Nginx and Postgres
https://github.com/mathleite/simple-php-router
composer docker docker-compose illuminate-database nginx php-router php7 phpfpm postgres postgresql router slack slack-webhook webhooks
Last synced: about 10 hours ago
JSON representation
Simple router usage with PHP7.4, Docker, Nginx and Postgres
- Host: GitHub
- URL: https://github.com/mathleite/simple-php-router
- Owner: mathleite
- License: gpl-3.0
- Created: 2020-03-18T12:12:13.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-06-14T23:13:11.000Z (over 3 years ago)
- Last Synced: 2023-03-07T20:56:33.933Z (over 1 year ago)
- Topics: composer, docker, docker-compose, illuminate-database, nginx, php-router, php7, phpfpm, postgres, postgresql, router, slack, slack-webhook, webhooks
- Language: PHP
- Homepage:
- Size: 81.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Simple PHP Router
SETUP
Nginx
PHP8
Docker
#### Start app
- Build Docker containers
```docker
docker-compose up --build -d
```- Install Composer dependencies
```docker
docker exec -it php composer install
```### Create your own routes
`app/Route/index.php`
```php
$route->registry('/greet', \App\Greet\GreetController::class, 'index');
```Where:
- `/user` is the **route** that you want to *register*;
- `\App\Greet\GreetController::class` is the *Controller* **namespace**;
- `index` is a controller *function*