PHP code example of fatjon-lleshi / antares-router
1. Go to this page and download the library: Download fatjon-lleshi/antares-router 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/ */
fatjon-lleshi / antares-router example snippets
use Antares\Router\Attributes\Get;
use Antares\Router\Attributes\Post;
use Antares\Router\Attributes\Put;
use Antares\Router\Attributes\Patch;
use Antares\Router\Attributes\Delete;
class UserController
{
#[Get('/users')]
public function index(): void {}
#[Get('/users/{id}')]
public function show(): void {}
#[Post('/users', 201)]
public function store(): void {}
#[Put('/users/{id}')]
public function update(): void {}
#[Patch('/users/{id}')]
public function edit(): void {}
#[Delete('/users/{id}', 204)]
public function destroy(): void {}
}