skip to Main Content

How to do laravel eloquent table with joins, orwhere and pagination correctly?

This is my original code where i display all data for team users. $data = Teamuser::join('teams', 'teams.id', '=', 'team_user.team_id') ->join('users', 'users.id', '=', 'team_user.user_id') ->get(['users.name as username','teams.name','users.email','team_user.role','team_user.id','team_user.user_id','team_user.team_id']); However, since im developing a search function for the table. I try adding orwhere…

VIEW QUESTION
Back To Top
Search