maksi/laravel-idea-type-hinting

Better type hinting for eloquent models

1.0.1 2018-05-01 16:40 UTC

This package is auto-updated.

Last update: 2024-05-06 22:58:59 UTC


README

It is a package for better type hinting

Usages:

  1. You can extend the Maksi\TypeHinting\Database\Eloquent\Model model.
  2. You can use traits: Maksi\TypeHinting\Eloquent\Concerns\ModelAnnotations.php and Maksi\TypeHinting\Eloquent\Concerns\ModelStaticAnnotations.php directly in your models.

Methods from Eloquent builder will be type hinted on your models after model extending or traits usages

  • whereKey
  • whereKeyNot
  • where
  • find
  • findMany
  • findOrFail
  • findOrNew
  • firstOrNew
  • firstOrCreate
  • updateOrCreate
  • firstOrFail
  • firstOr
  • create
  • forceCreate
  • update
  • paginate

https://packagist.org/packages/maksi/laravel-idea-type-hinting

Issue

In case if you have some idea for improvements, then please create an issue/PR for this project