79243152

Date: 2024-12-02 06:47:36
Score: 1
Natty:
Report link

If you want to see whether the current user has voted or not then you can do something as follows:

$post->voters()
    ->where('user_id', auth()->id())
    ->where('type', 'down')
    ->exists();
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Jitendra Oza