2017 © Pedro PelĂĄez
 

library laravel-ide-macros

Generating a helper file for IDEs to support Laravel's macros.

image

tutorigo/laravel-ide-macros

Generating a helper file for IDEs to support Laravel's macros.

  • Wednesday, November 22, 2017
  • by KristofMorva
  • Repository
  • 1 Watchers
  • 4 Stars
  • 2,193 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 36 % Grown

The README.md

[!WARNING]
This repository is archived because I'm unable to maintain it, as I'm not a web developer anymore and forgot most of this stuff., (*1)

Please use an existing fork, or create your own with your changes., (*2)

Sorry about this, have fun working on whatever you're currently building :), (*3)

Laravel IDE Macros

It is advised to be used with 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 provides an additional IDE helper file for Laravel macros with the syntax you are already used to in Laravel IDE Helper., (*4)

Installation

Just require it in your Composer file, and you are good to go:, (*5)

"tutorigo/laravel-ide-macros": "*"

If you are using Laravel 5.4 or lower, you must register the IdeMacrosServiceProvider manually., (*6)

Configuration

Run the following command to publish the configuration file to config/ide-macros.php:, (*7)

php artisan vendor:publish --provider="Tutorigo\LaravelMacroHelper\IdeMacrosServiceProvider"

Usage

Generate helper file

Run the following command to generate the macro IDE helpers:, (*8)

php artisan ide-helper:macros

Use of non-static macros

Macros can be both static (ie. Route::sth()) and non-static (ie. Request::route()->sth()). To distinct the two, use the @instantiated tag in the PHPDoc of macros, which depend on $this, for example:, (*9)

/**
 * Gets the amount of route parameters
 *
 * @return array
 * @instantiated
 */
\Illuminate\Routing\Route::macro('parameterCount', function () {
    /** @var \Illuminate\Routing\Route $this */
    return count($this->parameters);
});

The Versions

22/11 2017

dev-master

9999999-dev

Generating a helper file for IDEs to support Laravel's macros.

  Sources   Download

MIT

The Requires

 

by KristĂłf Morva

laravel helper phpdoc autocomplete macros ide phpstorm netbeans sublime codeintel

22/11 2017

v1.0.3

1.0.3.0

Generating a helper file for IDEs to support Laravel's macros.

  Sources   Download

MIT

The Requires

 

by KristĂłf Morva

laravel helper phpdoc autocomplete macros ide phpstorm netbeans sublime codeintel

27/10 2017

v1.0.2

1.0.2.0

Generating a helper file for IDEs to support Laravel's macros.

  Sources   Download

MIT

The Requires

 

by KristĂłf Morva

laravel helper phpdoc autocomplete macros ide phpstorm netbeans sublime codeintel

23/10 2017

v1.0.1

1.0.1.0

Generating a helper file for IDEs to support Laravel's macros.

  Sources   Download

MIT

The Requires

 

by KristĂłf Morva

laravel helper phpdoc autocomplete macros ide phpstorm netbeans sublime codeintel

22/10 2017

v1.0.0

1.0.0.0

Generating a helper file for IDEs to support Laravel's macros.

  Sources   Download

MIT

The Requires

 

by KristĂłf Morva

laravel helper phpdoc autocomplete macros ide phpstorm netbeans sublime codeintel