PHP code example of ielfran / phptypes-bridge
1. Go to this page and download the library: Download ielfran/phptypes-bridge 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/ */
ielfran / phptypes-bridge example snippets
return [
'source_dirs' => ['app/Http/Controllers', 'app/DTOs'],
'output_dir' => 'resources/js/api',
'generators' => ['types', 'schemas', 'client'],
'base_url' => '',
];
#[ApiGroup(prefix: '/api')]
class UserController
{
#[ApiEndpoint(method: 'GET', path: '/users/{id}')]
public function show(int $id): UserDto { ... }
}