1. Go to this page and download the library: Download meowphp/routing library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
meowphp / routing example snippets
/**
* Register your application's controller here
*/
$controllers => [
\May\AttributesTest\MainController::class,
\May\AttributesTest\Controllers\ExampleController::class
],
# Route without attributes
#[Route('/hello/{id}/{surname}')]
public function sayHello() : string
# Route with attributes
#[Route("/good-bye")]
public function sayGoodBye() : string
# Default route
#[Route('/')]
public function index() : string