Laravel eloquent where error with <>

Solution:

You’re using wrong syntax. Correct syntax for with() is:

->with(['payments' => function ($query) {
    $query->where('type', '<>', 'point');
}])