devfrey/rector-eloquent-generics

Small set of Rector rules for Eloquent's new generics.

v0.1.1 2024-10-25 12:47 UTC

This package is auto-updated.

Last update: 2025-03-25 13:40:29 UTC


README

composer require --dev devfrey/rector-eloquent-generics
<?php

use Rector\Config\RectorConfig;

return RectorConfig::configure()
    // ...
    ->withRules([
        Devfrey\RectorLaravel\Eloquent\AddBuilderPropertyRector::class,
        Devfrey\RectorLaravel\Eloquent\AddGenericHasBuilderTraitRector::class,
        Devfrey\RectorLaravel\Eloquent\DocumentRelationGenericsRector::class,
    ]);