PHPackages                             ihor-radchenko/laravel-ide-helper-macros - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ihor-radchenko/laravel-ide-helper-macros

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ihor-radchenko/laravel-ide-helper-macros
========================================

Generate phpDoc for laravel macroable class.

1.0.6(7y ago)56223[1 issues](https://github.com/ihor-radchenko/laravel-ide-helper-macros/issues)[1 PRs](https://github.com/ihor-radchenko/laravel-ide-helper-macros/pulls)MITPHPPHP ^7.1.3

Since Jan 8Pushed 3y agoCompare

[ Source](https://github.com/ihor-radchenko/laravel-ide-helper-macros)[ Packagist](https://packagist.org/packages/ihor-radchenko/laravel-ide-helper-macros)[ Docs](https://github.com/ihor-radchenko/laravel-ide-helper-macros)[ RSS](/packages/ihor-radchenko-laravel-ide-helper-macros/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

Laravel IDE Macros
==================

[](#laravel-ide-macros)

It is advised to be used with [Laravel IDE Helper](https://github.com/barryvdh/laravel-ide-helper), which generates helper files for your IDE, so it'll be able to highlight and understand some Laravel-specific syntax. This package can generate phpDocs for Laravel classes, based on Macroable trait.

Installation
------------

[](#installation)

Require this package with composer using the following command:

```
composer require --dev ihor-radchenko/laravel-ide-helper-macros

```

If you are using Laravel 5.4 or lower, you must register the `IdeHelperMacrosServiceProvider` manually.

Configuration
-------------

[](#configuration)

Run the following command to publish the configuration file to `config/ide-helper-macros.php`:

```
php artisan vendor:publish --provider="IhorRadchenko\LaravelIdeHelperMacros\IdeHelperMacrosServiceProvider"

```

Automatic phpDoc generation for Laravel Macroable classes
---------------------------------------------------------

[](#automatic-phpdoc-generation-for-laravel-macroable-classes)

You need add macro or mixin in some service provider, example:

```
/**
 * Bootstrap services.
 *
 * @return void
 */
public function boot(): void
{
    /**
     * @param array $data
     *
     * @return \Illuminate\Http\Response
     */
    \Illuminate\Http\Response::macro('addContent', function (array $data) {
        /** @var \Illuminate\Http\Response $this */
        $response = $this;
        $content = json_decode($response->getContent(), true);
        if (is_array($content)) {
            $response->setContent(json_encode(array_merge($content, $data)));
        }

        return $response;
    });
}
```

And run the following command to generate the phpDocs IDE helpers:

```
php artisan ide-helper:macros

```

After that the following block will be generated in the \\Illuminate\\Http\\Response class:

```
/**
 * Illuminate\Http\Response
 *
 * @method \Illuminate\Http\Response addContent(array $data)
 * @package ide_helper_macros
 */
class Response extends BaseResponse
{
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

4

Last Release

2724d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/30658582?v=4)[Ihor Radchenko](/maintainers/ihor-radchenko)[@ihor-radchenko](https://github.com/ihor-radchenko)

---

Top Contributors

[![ihor-radchenko](https://avatars.githubusercontent.com/u/30658582?v=4)](https://github.com/ihor-radchenko "ihor-radchenko (10 commits)")

---

Tags

phpdoclaravelautocompletehelperidephpstormnetbeansmixinsmacros

### Embed Badge

![Health badge](/badges/ihor-radchenko-laravel-ide-helper-macros/health.svg)

```
[![Health](https://phpackages.com/badges/ihor-radchenko-laravel-ide-helper-macros/health.svg)](https://phpackages.com/packages/ihor-radchenko-laravel-ide-helper-macros)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k132.8M891](/packages/barryvdh-laravel-ide-helper)[phalcon/ide-stubs

The most complete Phalcon Framework IDE stubs library which enables autocompletion in modern IDEs.

1703.3M132](/packages/phalcon-ide-stubs)[mis/yii2-ide-helper

Yii2 IDE Helper, generates correct PHPDocs for all components, to improve auto-completion.

1666.7k3](/packages/mis-yii2-ide-helper)[firefly-iii/data-importer

Firefly III Data Import Tool.

8045.8k](/packages/firefly-iii-data-importer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
