dev1437 / model-parser
Parse Laravel Models
Installs: 6 519
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.1
Requires (Dev)
- doctrine/dbal: ^3.4
- laravel/sanctum: ^3.0
- orchestra/testbench: ^7.0
- phpunit/phpunit: ^9.5.10
This package is auto-updated.
Last update: 2025-03-17 11:13:30 UTC
README
This work is based on https://github.com/fumeapp/modeltyper, credit to them.
To use
use App\Models\User; use Dev1437\ModelParser\ModelParser; $parser = new ModelParser(User::class); $modelInfo = $parser->parse(); // Remove hidden fields e.g. password from output $parser = new ModelParser(User::class, true); $modelInfo = $parser->parse(); // Remove specific field e.g. email_verified_at from output $parser = new ModelParser(User::class, false, [ 'email_verified_at' ]); $modelInfo = $parser->parse();