我想选择两列并将其显示为我的控制器中的一列。这是我目前拥有的代码:
public function assignment()
{
$title = "View Parent Assignment";
$vpc = DB::table('dbo_guardianchild')
->join('dbo_students', 'dbo_guardianchild.StudentID', '=' , 'dbo_students.StudentID')
->join('dbo_guardianinformation' , 'dbo_guardianchild.GuardianInformationID' , '=' , 'dbo_guardianinformation.GuardianInformationID')
->select('dbo_students.StudentID' , 'dbo_students.FirstName AS sFname' , 'dbo_students.LastName AS sLname')
->get();
}
关于如何将dbo_students.FirstName
anddbo_students.LastName
合并为一列的任何想法?