feed () 里 Status::使用的时候,为什么前面不加 use 也可以正常作用?
feed()里Status::使用的时候,为什么前面不加use App\Status 也可以正常使用?
.
.
use Auth;
public function feed()
{
$user_ids = $this->followings->pluck('id')->toArray();
array_push($user_ids, $this->id);
return Status::whereIn('user_id', $user_ids)
->with('user')
->orderBy('created_at', 'desc');
}
推荐文章: