{"repo":"romanzipp/Laravel-Model-Doc","free":true,"listed":false,"github":"https://github.com/romanzipp/Laravel-Model-Doc","clone":"git clone https://github.com/romanzipp/Laravel-Model-Doc.git","description":"📝 Generate PHPDoc comments for Laravel Models","language":"PHP","stars":32,"topics":["php","laravel","eloquent","orm","showcase","ide"],"license":"MIT","category":"databases-storage","readme_excerpt":"Laravel Model PHPDoc Generator Generate PHPDoc comments for Laravel Models including database columns , relationships , accessors , query scopes and factories . Contents - Installation - Configuration - Features - Testing Installation Laravel <= 10 If you use a Laravel version lower than 11, you also need to install the doctrine/dbal package: Configuration Copy configuration to config folder: Usage See the configuration file for more specific use cases. Prepare your models 1. Add the corresponding table name 2. Add relation methods return types 3. Add accessor methods return types Example Set custom path You can set a custom base path for the generator using the usePath static method. See the configuration file for more specific use cases. Use verbose mode If you get an error when generating the documentation for a model, you can use the --v option to get more information about the error. Custom database types If (in verbose mode) you get an error like Unknown database type enum requested , you can add that custom type mapping in Laravel's database.php config file. Laravel uses the Doctrine DBAL package for database types. You can find a list of supported types here. Laravel provides an example for timestamp type mapping here. Here is an example for enum type mapping in database.php config file: Features - [x] Generate @property tags from attributes - [x] Look for attributes type casts - [x] Do not generate attribute @property tag if accessor exists - [x] Generate @method tag","default_branch":null,"files":null,"tree":[],"storefront":"/r/romanzipp","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/romanzipp/Laravel-Model-Doc/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}