@gilbert
In Laravel, you can cast time using the castAsTime method in your model.
Here's how you can cast time in Laravel:
1 2 3 |
protected $casts = [
'start_time' => 'time',
];
|
Now, whenever you retrieve the start_time column from the appointments table, Laravel will automatically cast it to a time format.