/laravel-ide-helper-hook-get-key

A Laravel Package for adding Eloquent getKey() type support to Laravel IDE Helper.

Primary LanguagePHPMIT LicenseMIT

Laravel IDE Helper Hook GetKey

Software License GitHub Tests Action Status Coverage Status Latest Version on Packagist Total Downloads

A Laravel Package for adding Eloquent GetKey type support to Laravel IDE Helper Laravel IDE Helper.

Installation

You can install the package via composer:

composer require --dev daniel-de-wit/laravel-ide-helper-hook-get-key

The GetKey Hook is loaded using Package Discovery, when disabled read Manual Installation.

Usage

Run standard model generation commands as normal:

php artisan ide-helper:models "App\Models\Post"

Docblocks will be added to the model

 * @method static null|string getKey()

Manual Installation

When disabled, register the LaravelIdeHelperHookGetKeyServiceProvider manually by adding it to your config/app.php

/*
 * Package Service Providers...
 */
 DanielDeWit\LaravelIdeHelperHookGetKey\Providers\LaravelIdeHelperHookGetKeyServiceProvider::class,

Testing

composer test

Credits

License

The MIT License (MIT). Please see License File for more information.