PHP code example of grazulex / laravel-arc

1. Go to this page and download the library: Download grazulex/laravel-arc 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/ */

    

grazulex / laravel-arc example snippets


$userData = ['name' => 'John Doe', 'email' => '[email protected]'];
$userDto = UserDTO::fromArray($userData);

echo $userDto->name; // 'John Doe'
echo $userDto->toJson(); // JSON representation
bash
php artisan dto:definition-init UserDTO --model=App\\Models\\User --table=users
bash
php artisan dto:generate user.yaml