public function scopeWithGiver($query)
{
$userTableName = (new User())->getTable();
$thisTableName = $this->getTable();
return $query->whereExists(function ($query) use($userTableName, $thisTableName) {
$query->select(DB::raw(1))->from($userTableName)->whereRaw("{$userTableName}.user_id = {$thisTableName}.giver_id");
});
}