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

Laravel records entity wrong

There are entity and on recording to database, record wrong data Code to record entity public function createTelegramUser($entity) { TelegramUser::create($entity); } Entity [entity] => Array ( [telegram_id] => 5403205983 [is_bot] => [first_name] => Belarus => dilshodbelarus [language_code] => ru [message]…

VIEW QUESTION
Back To Top
Search