Package to reflect the properties and methods of the model
shirokovnv/model-reflection is a Laravel package for package to reflect the properties and methods of the model.
It currently has 3 GitHub stars and 51 downloads on Packagist (latest version 1.0.0).
Install it with composer require shirokovnv/model-reflection.
Discover more Laravel packages by shirokovnv
or browse all Laravel packages to compare alternatives.
Last updated
The package allows you to reflect properties and methods of the model and save received information in form of a JSON schema.
Via Composer
$ composer require shirokovnv/model-reflection
This package is based on Doctrine/DBAL
Once installed you can do stuff like this:
$user_schema = ModelReflection::reflect(\App\Models\User::class);
this will return ReflectedModel containing information about:
or you can do:
$user_schema->toArray();
this will return an associative array for JSON representation.
Please see the changelog for more information on what has changed recently.
$ composer test
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
MIT. Please see the license file for more information.