$table = 'favorite_contents';
$contents = DB::table($table)
->join('contents', function($join) use($table){
$join->on("$table.content_id", '=', 'contents.id');
})
->whereIn("$table.content_id",$ids)
->update(array(
"$table.expired" => 1,
"$table.type" => "contents.type"
));
The "$table.expired" => 1
is working fine, but the "$table.type" => "contents.type"
doesn't.
So the problem has something to do with getting the value of type in the contents table, how do I do this without resorting to foreach?