axn/laravel-models-scanner
最新稳定版本:1.1.0
Composer 安装命令:
composer require axn/laravel-models-scanner
包简介
Scans Eloquent models to show some information about them.
README 文档
README
Scans Eloquent models to show some information about them. It also scans database (default connection) to compare with models.
Installation
Install the package with Composer:
composer require axn/laravel-models-scanner --dev
Publish config if needed using these commands:
php artisan vendor:publish --tag=models-scanner-config
Config is published in config/models-scanner.php
Modify config options if needed.
Usage
In your browser, go to https://{your_project_domain}/_models
This URL is only accessible in local environment.
This showing:
- Table name with associated model class
- Information about if model uses SoftDeletes
- Models relationships with:
- Method name
- Method type (BelongsTo, HasMany, etc.)
- Related model class
- Information about withTrashed or whithoutTrashed on the relationship, if related model uses SoftDeletes
- DB schema of the relationship (for example:
users.id ← posts.user_id) - DB constraint name, if set
- Proposals of relationships detected from DB (aligned right)
BelongsTo relationships are colored in blue. HasMany relationships are colored in orange. Other types of relationships are left black. If red: there is an error (for example: the related model does not exist).
On a proposed relationship, you can left click to copy the corresponding code to clipboard. You can also right click to copy all proposed relationships code to clipboard.
统计信息
- 总下载量: 92
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-17