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:
- class name
- table name
- fields
- relations
- table foreign keys
- scopes
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 shirokovnv@gmail.com instead of using the issue tracker.
MIT. Please see the license file for more information.