PHP code example of huy-tran / api-explorer-module
1. Go to this page and download the library: Download huy-tran/api-explorer-module 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/ */
class CreateDocumentData extends Data
{
public function __construct(
#[Required]
public Project $project, // → projectId (number), auto-derived
#[Required]
public string $title,
) {}
}
use Modules\ApiExplorer\Attributes\BodyField;
class CreateDocumentData extends Data
{
public function __construct(
#[BodyField('externalRef', 'text')] // UUID key, text input
public SomeModel $ref,
#[BodyField('parentId')] // custom key name
public Project $project,
) {}
}