PHP code example of ivanomatteo / laravel-model-utils
1. Go to this page and download the library: Download ivanomatteo/laravel-model-utils 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/ */
ivanomatteo / laravel-model-utils example snippets
use IvanoMatteo\ModelUtils\ModelUtils;
dump(ModelUtils::findModels());
$mu = new ModelUtils(\App\User::class);
dump('id visible:',$mu->isVisible('id'));
dump('password visible:',$mu->isVisible('password'));
dump($mu->getValidationRules());
dump($mu->getValidationRules(true)); //also for not fillable fields
dump($mu->getMetadata());