登录 注册

laravel-ide-helper

去点 Star
开发者工具
14,976
Stars
—
Forks
0
Watchers
—
Open Issues
待补全
许可证
PHP
语言
—
创建时间
最近更新

项目能做什么

Laravel 的 IDE 辅助扩展,可自动生成代码补全文件,提升开发体验。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# IDE Helper Generator for Laravel

[![Tests](https://github.com/barryvdh/laravel-ide-helper/actions/workflows/run-tests.yml/badge.svg)](https://github.com/barryvdh/laravel-ide-helper/actions)
[![Packagist License](https://img.shields.io/badge/Licence-MIT-blue)](http://choosealicense.com/licenses/mit/)
[![Latest Stable Version](https://img.shields.io/packagist/v/barryvdh/laravel-ide-helper?label=Stable)](https://packagist.org/packages/barryvdh/laravel-ide-helper)
[![Total Downloads](https://img.shields.io/packagist/dt/barryvdh/laravel-ide-helper?label=Downloads)](https://packagist.org/packages/barryvdh/laravel-ide-helper)
[![Fruitcake](https://img.shields.io/badge/Powered%20By-Fruitcake-b2bc35.svg)](https://fruitcake.nl/)

**Complete PHPDocs, directly from the source**

This package generates helper files that enable your IDE to provide accurate autocompletion.
Generation is done based on the files in your project, so they are always up-to-date.

The 3.x branch supports Laravel 10 and later. For older version, use the 2.x releases.

- [Installation](#installation)
- [Usage](#usage)
  - [Automatic PHPDoc generation for Laravel Facades](#automatic-phpdoc-generation-for-laravel-facades)
  - [Automatic PHPDocs for models](#automatic-phpdocs-for-models)
    - [Model Directories](#model-directories)
    - [Ignore Models](#ignore-models)
    - [Model Hooks](#model-hooks)
  - [Automatic PHPDocs generation for Laravel Fluent methods](#automatic-phpdocs-generation-for-laravel-fluent-methods)
  - [Auto-completion for factory builders](#auto-completion-for-factory-builders)
  - [PhpStorm Meta for Container instances](#phpstorm-meta-for-container-instances)
- [License](#license)

## Installation

Require this package with composer using the following command:

```bash
composer require --dev barryvdh/laravel-ide-helper
```


## Usage

### TL;DR

Run this to generate autocompletion for Facades. This creates _ide_helper.php

```
php artisan ide-helper:generate
```

Run this to add phpdocs for your models. Add -RW to Reset existing phpdocs and Write to the models directly.
```
php artisan ide-helper:models -RW
```

If you don't want the full _ide_helper.php file, you can run add `--write-eloquent-helper` to the model command to generate small version, which is required for the `@mixin \Eloquent` to be able to add the QueryBuilder methods.

If you don't want to add all the phpdocs to your Models directly, you can use `--nowrite` to create a separate file. The  `--write-mixin` option can be used to only add a `@mixin` to your models, but add the generated phpdocs in a separate file. This avoids having the results marked as duplicate.


_Check out [this Laracasts video](https://laracasts.com/series/how-to-be-awesome-in-phpstorm/episodes/15) for a quick introduction/explanation!_

- `php artisan ide-helper:generate` - [PHPDoc generation for Laravel Facades ](#automatic-phpdoc-generation-for-laravel-facades)
- `php artisan ide-helper:models` - [PHPDocs for models](#au
阅读完整原文

项目深度分析 AI 生成

IDE 深度集成插件(VS Code / PhpStorm 市场工具)

产品构想将 ide-helper 的底层生成逻辑封装为 GUI/IDE 插件,实现保存时自动后台分析、错误补全修复、模型关系可视化,免去手动执行 artisan 命令的繁琐。
核心功能后台静默生成与增量更新、模型属性自动提示增强、Laravel 关系链快速跳转、GUI 配置面板
目标用户使用 VSCode 或 PhpStorm 的 Laravel 个人开发者及企业团队
难度/周期中等 · 2-3 个月 · 成本:开发机器、JetBrains/VSCode 插件市场开发者账户年费
收费模式插件应用商店订阅制(Freemium,高级特性如跨模块关联分析需月费订阅)
竞争风险JetBrains 官方自带的 Laravel 插件或现有第三方插件(如 Laravel Idea)竞争壁垒较高;生态位受挤压。
依据 AI推测

Laravel 遗留项目自动化类型重构与迁移服务

产品构想结合 ide-helper 的模型与 Facade 解析能力,提供企业大型 Laravel 老旧版本向现代化强类型(PHP 8.x + Laravel 10/11)自动重构的 CLI 或一键迁移分析报告服务。
核心功能模型属性强类型注入、废弃 Facade 自动替换、Docblock 批量校验、迁移风险评估报告
目标用户维护 5 年以上老旧 Laravel 项目的企业、技术外包服务团队
难度/周期高 · 3-6 个月 · 成本:静态分析算法开发投入、算力测试服务器成本
收费模式按代码量计费的企业迁移审计工具授权或技术咨询服务费
竞争风险传统企业获客周期长,定制化需求多,交付成本不可控。
依据 尚需验证的假设

CI/CD 代码健康与类型覆盖度自动化检测 SaaS

产品构想在 CI 流程中利用 ide-helper 生成元数据,对比实际代码中的类型覆盖率、过期 PHPDoc 及潜在类型错误,输出质量看板及 PR 阻断策略。
核心功能CI 自动化集成脚本、PHPDoc 与数据库字段一致性检测看板、PR 自动标注、技术债量化评估
目标用户采用 CI/CD 且对代码质量要求严苛的中大型 Laravel 开发团队
难度/周期中等 · 2-4 个月 · 成本:SaaS 服务器与存储成本、CI Runner 算力
收费模式B2B SaaS 订阅制(按仓库数或活跃开发者席位收费)
竞争风险PHPStan/Larastan 等静态分析工具已具备部分类似能力,功能独特性易受质疑。
依据 AI推测
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
laravelbook/laravel4-phpstorm-helper 中文介绍暂未生成
Laravel 4 IDE Helper for Jetbrains PhpStorm
146 PHP
laravelbook/laravel4-sublimetext-helper 中文介绍暂未生成
Laravel 4 IDE Helper for Sublime Text 2
97 PHP
danielboendergaard/laravel-3-ide-helper 中文介绍暂未生成
Provides Laravel auto-completion for Jetbrains PHPStorm
90 PHP
Soyhuce/next-ide-helper 中文介绍暂未生成
Laravel ide helper rebuilt under steroids
48 PHP
KristofMorva/laravel-ide-macros 中文介绍暂未生成
Generating a helper file for IDEs to support Laravel's macro
45 PHP
Wulfheart/laravel-actions-ide-helper 中文介绍暂未生成
21 PHP
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建时间待补全,最近推送 ,发布过 57 个 Release
社区活跃Star 14,976 / Fork 0 / Issue 0(数据支持,可自行核实)
许可证未检测到(需人工确认)
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。