Error: Class '\App\Models\User' not found in fil code example
Example: Method 'where' not found in \App\Models\User
Laravel 6+
use Illuminate\Database\Eloquent\Builder;
/**
* @mixin Builder
*/
class Post extends Model {
########## ALTERNATIVE ################
run these commands
composer require --dev barryvdh/laravel-ide-helper
php artisan ide-helper:models
// select next option as no after this command