{"id":18133004,"url":"https://github.com/sethsandaru/eloquent-docs","last_synced_at":"2025-08-14T09:31:37.053Z","repository":{"id":57594455,"uuid":"526956112","full_name":"sethsandaru/eloquent-docs","owner":"sethsandaru","description":"Generate phpDoc for your Eloquent Models with ease","archived":false,"fork":false,"pushed_at":"2024-06-11T18:28:32.000Z","size":93,"stargazers_count":50,"open_issues_count":7,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-11T07:02:21.137Z","etag":null,"topics":["eloquent","laravel","php","phpdoc"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sethsandaru.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-20T14:52:27.000Z","updated_at":"2025-07-21T08:59:44.000Z","dependencies_parsed_at":"2024-05-13T04:26:14.735Z","dependency_job_id":"b65636df-64aa-45e9-86c3-593a0d8a9edc","html_url":"https://github.com/sethsandaru/eloquent-docs","commit_stats":{"total_commits":25,"total_committers":2,"mean_commits":12.5,"dds":"0.040000000000000036","last_synced_commit":"ffd48c13ab6209f8bbd5a0c529deb1ed2c5c6aeb"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/sethsandaru/eloquent-docs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethsandaru%2Feloquent-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethsandaru%2Feloquent-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethsandaru%2Feloquent-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethsandaru%2Feloquent-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sethsandaru","download_url":"https://codeload.github.com/sethsandaru/eloquent-docs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethsandaru%2Feloquent-docs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269915010,"owners_count":24495636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eloquent","laravel","php","phpdoc"],"created_at":"2024-11-01T13:06:35.849Z","updated_at":"2025-08-14T09:31:36.682Z","avatar_url":"https://github.com/sethsandaru.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Eloquent phpDoc Generator\n\n[![codecov](https://codecov.io/gh/sethsandaru/eloquent-docs/branch/main/graph/badge.svg?token=7KWW0SKF9P)](https://codecov.io/gh/sethsandaru/eloquent-docs)\n[![Latest Stable Version](http://poser.pugx.org/sethphat/eloquent-docs/v)](https://packagist.org/packages/sethphat/eloquent-docs)\n[![Total Downloads](http://poser.pugx.org/sethphat/eloquent-docs/downloads)](https://packagist.org/packages/sethphat/eloquent-docs)\n[![Build and test [MYSQL]](https://github.com/sethsandaru/eloquent-docs/actions/workflows/build_mysql.yaml/badge.svg?branch=main)](https://github.com/sethsandaru/eloquent-docs/actions/workflows/build_mysql.yaml)\n[![Build and test [SQLite]](https://github.com/sethsandaru/eloquent-docs/actions/workflows/build_sqlite.yaml/badge.svg?branch=main)](https://github.com/sethsandaru/eloquent-docs/actions/workflows/build_sqlite.yaml)\n[![Build and test [PostgreSQL]](https://github.com/sethsandaru/eloquent-docs/actions/workflows/build_postgresql.yaml/badge.svg?branch=main)](https://github.com/sethsandaru/eloquent-docs/actions/workflows/build_postgresql.yaml)\n[![Build on specific PHP \u0026 Laravel versions](https://github.com/sethsandaru/eloquent-docs/actions/workflows/build_laravel.yaml/badge.svg)](https://github.com/sethsandaru/eloquent-docs/actions/workflows/build_laravel.yaml)\n\nQuickly generate the phpDoc for your Eloquent Model. Make your Eloquent super friendly with IDEs (eg PHPStorm).\n\nAnd maintaining the phpDoc of your models don't have to be a pain in the ass, should be:\n\n- Fun\n- Fast\n- Reliable\n\nAnd, welcome to Eloquent phpDoc Generator, which going to help you to achieve the 3 points above 🎉\n\n## What will Eloquent phpDoc Generator will generate?\n- Table name\n- Table columns (with correct types - including Casting types 😎)\n- Model relationships\n- Model attributes/accessors\n\n## Available For / Requirements\n\n- **v2.x**: Laravel 11, PHP 8.2+.\n- **v1.x**: Laravel 9/10, PHP 8.0, 8.1.\n\n## Install\nInstall as dev-dependencies is enough, since you are only going to use this command on `local/development` env.\n\n```bash\ncomposer require sethphat/eloquent-docs --dev\n```\n\nLaravel auto-discovery will automatically do the magic for you.\n\n## Use the command\n\n```bash\nphp artisan eloquent:phpdoc \"App\\Models\\User\" # view only\nphp artisan eloquent:phpdoc \"App\\Models\\User\" --write # view \u0026 write to file\nphp artisan eloquent:phpdoc \"App\\Models\\User\" --short-class # new option - use short class instead of full namespace path\n\n# from v1.2.0\nphp artisan eloquent:bulk-phpdoc \"app/Models/*.php\" # bulk generation (force write mode)\n```\n\nResult:\n\n\u003cdetails\u003e\n\n```bash\n====== Start PHPDOC scope of App\\Models\\User\n/**\n* Table: users\n*\n* === Columns ===\n* @property int $id\n* @property string $name\n* @property string $email\n* @property \\Carbon\\Carbon|null|null $email_verified_at\n* @property string $password\n* @property string|null $remember_token\n* @property \\Carbon\\Carbon|null $created_at\n* @property \\Carbon\\Carbon|null $updated_at\n*\n* === Relationships ===\n* @property-read \\App\\Models\\Emails[]|\\Illuminate\\Database\\Eloquent\\Collection|null $emails\n* @property-read \\App\\Models\\UserDetails|null $userDetail\n*\n* === Accessors/Attributes ===\n* @property-read string $full_name\n* @property-read string $is_admin\n* @property-read string $user_type\n* @property-read int $total_salary\n* @property-read mixed $levels\n* @property-read mixed $first_name\n* @property-read mixed $last_name\n*/\n====== End PHPDOC scope of App\\Models\\User\nWrote phpDoc scope to /\u003cmy-path\u003e/app/Models/User.php\nThank you for using EloquentDocs!\n```\n\n\u003c/details\u003e\n\n## Best practices\n- Use `$casts` in your model, in order to help EloquentPhpDoc generate better types for you (array, date, datetime,...)\n- For `get*Attribute` accessor, always declare the return type\n\nNote: for Eloquent new `Attribute` class utilize the data via Closure, making it impossible to acquire the return types. \nFor this case, EloquentDocs will always return `mixed`\n\n## Release logs\n- v1.0.0\n  - First version\n  - View \u0026 Update phpDoc for a single Model at a time\n- v1.1.0\n  - `--short-class`\n  - Fixed some issues\n- v1.1.1\n  - Fixed issue when generating a table that has `enum` column\n- v1.1.2\n  - Fixed issue when first-time install the library that made Laravel discovery went wrong.\n- v1.1.3 \u0026 v1.1.4\n  - Improved the indents\n  - Supported Laravel 10\n  - Deprecated Laravel 8\n  - Deprecated PHP 8.0\n- v1.2.0\n  - New command to bulk generate from a given model path.\n    - `php artisan eloquent:bulk-phpdoc \"app/Models/*.php\"`\n  - Fixed an issue where accessors/attributes being generated as snake_case. Should be camelCase.\n- v2.0.0\n  - Supports Laravel 11 + PHP 8.2/8.3\n  - DBAL as required dependencies\n  - Better date/datetime parsing (Carbon \u0026 Carbon immutable)\n  - Better boolean parsing\n\n## Contribute to the library\n\nFeel free to fork this library and sending a PR here.\n\nNote: all the contributions need to follow PSR-12 and cover everything under unit testing.\n\n## LICENSE\n\nMIT License\n\n## Made by\n\n- [Seth Phat](https://github.com/sethsandaru)\n- And contributors\n\n## (Sponsered Content) Introducing RenderPDF.io - Render your PDF in seconds\n\n![RenderPDF.io](https://github.com/shipsaas/docking/raw/main/.github/render-pdf-io.png)\n\n[RenderPDF.io](https://renderpdf.io) is a Render-PDF-as-a-Service that provides developer-friendly APIs\nto render your HTML content to modern PDFs file sin seconds 😎.\n\nAll you have to do is get your API Key and send RenderPDF.io an API call 🚀, no infrastructure setup, no overhead and\nhassle-free integration 🔋.\n\nGet your free API Key today: [Sign Up to RenderPDF.io](https://renderpdf.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsethsandaru%2Feloquent-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsethsandaru%2Feloquent-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsethsandaru%2Feloquent-docs/lists"}