PhpStorm gives warning when access to Auth::user()->id

时间:2019-04-08 13:47:57

标签: laravel phpstorm

First of all, I could access to Auth::user()->id when running the functions. But the IDE (PhpStorm) gives warnings like

"Field 'id' not found in \Illuminate\Contracts\Auth\Authenticatable|null less... (Ctrl+F1) 
Referenced field is not found in subject class.  
Note: Check is not performed on objects of type "stdClass" or derived."

But the id field does exists in the database table. How could I solve this issue in PhpStorm?

0 个答案:

没有答案