1

enter image description hereBecause of the full-calendar dependency I'm using on the front end of this web application, I need to have the cleaner_colour specified as backgroundColour, not backgroundcolour, however postgres seems to not accept this syntax.

I was considering making users table case sensitive using the collation COLLATE SQL_Latin1_General_CP1_CS_AS, (see T-SQL: How do I create a unique key that is case sensitive?) however I believe this still won't pass backgroundColor with the capital C that it needs.

enter image description here

public function get_turnovers()
{
        return DB::table('cleanings')
        ->leftJoin('units', 'cleanings.unit_id', '=', 'units.id')
        ->leftJoin('users as u1', 'cleanings.cleaner_id', '=', 'u1.id')
        ->leftJoin('users as u2', 'cleanings.cleaner2_id', '=', 'u2.id')
        ->where('turnover', true)
        ->selectRaw("concat('T ', suite_name, '  ',  suite_number) as title, cleaning_date as date, cleanings.id,
        turnover, booking_id, cleaner_id, cleaner2_id, 
        units.location as location,
        u1.first_name as c1_first_name,
        u2.first_name as c2_first_name,
        u1.cleaner_colour as backgroundColor,
        u1.last_name as c1_last_name,
        u2.last_name as c2_last_name,
        cleanings.notes as notes")
        ->get();
}
Salman Zafar
  • 3,844
  • 5
  • 20
  • 43

0 Answers0