Wagner da Silveira

Results 6 comments of Wagner da Silveira

I'm currently using it like this: ```php $users = $user->doesntHaveFriendships() ->where('id', '', $user->id) ->inRandomOrder() ->take($limit ) ->get(); ``` I added in my App\Models\User.php model: ```php public function invertedFriends() { $friendshipModelName...

The same need happens to list the publications of the user and friends: ```php $user = auth()->user(); $publications = Publication ::where(function (Builder $query) use ($user) { $query->whereHas('user.friends', function (Builder $query)...

This worked for me: sasl: enabled: true handshake: true username: ************ password: ************ mechanism: "scram-sha256" tls: enabled: true insecureSkipTlsVerify: true caFile: "" certFile: "" keyFile: "" Ref.: https://github.com/danielqsj/kafka_exporter/issues/116#issuecomment-559108062

Search friends: ```php $filter = '%Wagner%S%'; $friends = $user->getFriendsQueryBuilder() ->where(function($query) use ($filter) { $query->where('name', 'LIKE', $filter); }) ->paginate(20); ``` https://github.com/multicaret/laravel-acquaintances/issues/83#issuecomment-1146870186

@manuelbcd, how you solved the problem? Thanks!