composer require --dev devfrey/rector-eloquent-generics
return RectorConfig::configure()
// ...
->withRules([
Devfrey\RectorLaravel\Eloquent\AddBuilderPropertyRector::class,
Devfrey\RectorLaravel\Eloquent\AddGenericHasBuilderTraitRector::class,
Devfrey\RectorLaravel\Eloquent\DocumentRelationGenericsRector::class,
]);