PHP code example of mdnayeemsarker / viewmodel-generator

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

    

mdnayeemsarker / viewmodel-generator example snippets

bash
php artisan make:viewmodel PostViewModel
bash
php artisan make:viewmodel UserViewModel --model=User
bash
php artisan make:viewmodel ReportViewModel --model=User,Post,Category
bash
php artisan make:viewmodel UserCollectionViewModel --model=User --collection
bash
php artisan make:viewmodel AdminReportViewModel --model=User,Post --collection