user() && auth()->user()->agency) { // $projectIds = auth()->user()->agency->projects->pluck('id')->all(); // $builder->whereIn('project_id', $projectIds); // } // }); } public function project() { return $this->belongsTo(Project::class); } public function partner() { return $this->morphTo(); } public function type() { return paymentTypes($this->type_id); } }