laravel-ide-helper: Method not found when use model create function

When I create new model: $user = User::create($attributes); and next I want call function from user ($user->addRole($role)) I got

Method ‘addRole’ not found in \Illuminate\Database\Eloquent\Model

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18

Most upvoted comments

i have that problem with User::create($userData) … Method ‘create’ not found in \App\User

but it’s work , all data store in DB