Find the best Rector rule to solve your problem. Searching through 823 rules.

Found 1 rule. That's the one:

Configurable

EloquentMagicMethodToQueryBuilderRector

The EloquentMagicMethodToQueryBuilderRule is designed to automatically transform certain magic method calls on Eloquent Models into corresponding Query Builder method calls.

 use App\Models\User;

-$user = User::first();
+$user = User::query()->first();
 $user = User::find(1);