Skip to content

Simple router usage with PHP7.4, Docker, Nginx and Postgres

License

Notifications You must be signed in to change notification settings

mathleite/simple-php-router

Repository files navigation

Simple PHP Router

Workflow badge

SETUP
Nginx PHP8 Docker

Start app

  • Build Docker containers

    docker-compose up --build -d
    
  • Install Composer dependencies

    docker exec -it php composer install
    

Create your own routes

app/Route/index.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