How to middleware work in php with sample code

How to use

  • Clone project
  • Run composer install
  • Run code with php -S localhost:8000