我有以下列名列,我想只显示日列名,所以7 - 13
array:20 [▼
0 => "id"
1 => "customer_id"
2 => "enrolment_id"
3 => "course_id"
4 => "delivery_mode"
5 => "course_cost"
6 => "location"
7 => "Monday"
8 => "Tuesday"
9 => "Wednesday"
10 => "Thursday"
11 => "Friday"
12 => "Saturday"
13 => "Sunday"
14 => "start_time"
15 => "end_time"
16 => "start_date"
17 => "sale_type"
18 => "created_at"
19 => "updated_at"
]
使用以下命令在控制器中创建数组:
$columns = Schema::getColumnListing('orders');
我使用以下内容将列名称显示为刀片模板视图中我的复选框的标签,但它显示所有列名称而不仅仅是日期:
@foreach($columns as $column)
{{ Form::checkbox($column, 0, null, ['id' => $column, 'class' => 'is-
checkradio is-white']) }}
{{ Form::label($column, $column) }}
@endforeach