Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ngmy/laravel-ide-helper-eloquent

Laravel IDE Helper Eloquent generates a stub file to enable autocompletion for QueryBuilder methods on models in IDEs/editors that do not support `@mixin`.
https://github.com/ngmy/laravel-ide-helper-eloquent

autocompletion eloquent laravel

Last synced: 17 days ago
JSON representation

Laravel IDE Helper Eloquent generates a stub file to enable autocompletion for QueryBuilder methods on models in IDEs/editors that do not support `@mixin`.

Awesome Lists containing this project

README

        

# Laravel IDE Helper Eloquent

Laravel IDE Helper Eloquent generates an Eloquent stub file that renames the `Eloquent` to `Illuminate\Database\Eloquent\Model`
in the `_ide_helper.php` file generated by [Laravel IDE Helper](https://github.com/barryvdh/laravel-ide-helper).
It enables autocompletion for QueryBuilder methods like `find()` and `create()` on models in IDEs/editors that do not
support `@mixin`, such as the free version of Intelephense.

## Motivation

https://github.com/bmewburn/vscode-intelephense/issues/708

## Installation

```bash
composer require --dev ngmy/laravel-ide-helper-eloquent
```

## Usage

First, generate the IDE Helper file using Laravel IDE Helper:

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

Then, generate the Eloquent stub file using Laravel IDE Helper Eloquent:

```bash
php artisan ide-helper:eloquent-stub
```

## Changelog

Please see the [changelog](CHANGELOG.md).

## License

Laravel IDE Helper Eloquent is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).