lav
2 months ago

Get a data from the sql using Laravel

Posted 2 months ago by lav

The table name is ggt_driver

 working_shift_days: [
    {"value":"Mon","name":"Mon","checked":true},
    {"value":"Tue","name":"Tue","checked":true},                                     
        {"value":"Wed","name":"Wed","checked":true},
        {"value":"Thu","name":"Thu","checked":true},
        {"value":"Fri","name":"Fri","checked":true},
        {"value":"Sat","name":"Sat","checked":true},
        {"value":"Sun","name":"Sun","checked":true}
]
working_shift_time: [
        {"value":"Shift 1 (6AM to 2PM)","name":"Shift 1 (6AM to 2PM)","checked":true},
        {"value":"Shift 2 (2PM to 10 PM)","name":"Shift 2 (2PM to 10 PM)","checked":true},
        {"value":"Shift 3 (10PM to 6AM)","name":"Shift 3 (10PM to 6AM)","checked":true}
   ] 

If the user enter the shift_day "Mon" and shift_time is 11:00 Am. And also check that it should be checked value is true. Then how we search it in Mysql using laravel. Also optimise the query.

Please sign in or create an account to participate in this conversation.