PHP code example of maxbeckers / php-builder-generator
1. Go to this page and download the library: Download maxbeckers/php-builder-generator 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/ */
maxbeckers / php-builder-generator example snippets
namespace App\Model;
use MaxBeckers\PhpBuilderGenerator\Attributes\Builder;
#[Builder]
class User
{
public function __construct(
public string $name,
public string $email,
public ?int $age = null,
public array $roles = []
) {}
}