Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.