In Laravel, we could join two tables with this:
DB::table("users")->join('moreusers', 'users.id', '=', 'moreusers.user_id')->get();
And extract the data using this:
$querydata[$i]->email
If both tables contain the same column name, how can I get it from the first and second table?
Thank.
source
share