PHP code example of emsifa / evo
1. Go to this page and download the library: Download emsifa/evo 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/ */
emsifa / evo example snippets
#[RoutePrefix('users')]
class UserController extends Controller
{
#[Get]
public function index(
#[Query] int $limit,
#[Query] int $offset,
#[Query('q')] string $keyword,
): UserPaginationResponse
{
// your logic goes here
}
#[Post]
public function store(
#[Body] CreateUserDto $data
): StoreUserResponse
{
// your logic goes here
}
#[Put('{id}')]
public function update(
#[Param] int $id,
#[Body] UpdateUserDto $data,
): UpdateUserResponse
{
// your logic goes here
}
}