I would like to know how to recuperate the format time on my form please? For example start_time => 20:00 and end_time 22:00.
In my table course I have this
public function up()
{
Schema::create('course', function (Blueprint $table) {
$table->increments('id');
$table->date('date_seance');
$table->time('start_time');
$table->time('end_time');
$table->timestamps();
});
}
Then, on my model course I have this
class Course extends Model
{
//
protected $dates = ['date_seance', 'start_time', 'end_time'];
}
In my view index.blade
@foreach($course as $item)
<tr>
<td> {{$item->date_seance->format('d/m/Y') }}</td>
<td> {{$item->start_time}}</td>
<td> {{$item->end_time}}</td>
Thank you for your help.