01 2020
This commit is contained in:
parent
bed91c4f4a
commit
c8948338bb
122 changed files with 7911 additions and 1639 deletions
|
|
@ -33,35 +33,42 @@ class CMSContentInfoController extends Controller
|
|||
$locals = CMSInfoAvailable::whereType('local')->whereSpecial(false)->get();
|
||||
foreach ($locals as $value){
|
||||
$date = CMSInfoAvailable::getWeekWithDate($value->wday);
|
||||
$ret['local'][$date['date']] = [
|
||||
$ret['local'][strtotime($date['date'])] = [
|
||||
'day'=>$days[$value->wday],
|
||||
'active' => $value->active,
|
||||
'from' => $value->from,
|
||||
'to' => $value->to,
|
||||
'date' => $date['date'],
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
$phones = CMSInfoAvailable::whereType('phone')->whereSpecial(false)->get();
|
||||
foreach ($phones as $value){
|
||||
$date = CMSInfoAvailable::getWeekWithDate($value->wday);
|
||||
$ret['phone'][$date['date']] = [
|
||||
$ret['phone'][strtotime($date['date'])] = [
|
||||
'day'=>$days[$value->wday],
|
||||
'active' => $value->active,
|
||||
'from' => $value->from,
|
||||
'to' => $value->to,
|
||||
'date' => $date['date'],
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
$specials = CMSInfoAvailable::whereSpecial(true)->get();
|
||||
foreach ($specials as $special){
|
||||
$ret[$special->type][$special->date] = [
|
||||
$ret[$special->type][strtotime($special->date)] = [
|
||||
'day'=>$days[$special->wday],
|
||||
'active' => $special->active,
|
||||
'from' => $special->from,
|
||||
'to' => $special->to,
|
||||
'date' => $special->date,
|
||||
|
||||
];
|
||||
}
|
||||
// ksort($ret);
|
||||
ksort($ret['local']);
|
||||
ksort($ret['phone']);
|
||||
|
||||
$ret['info']['office_important_note_active'] = CMSInfo::getContentBySlug('office-important-note-active');
|
||||
$ret['info']['office_important_note'] = CMSInfo::getContentBySlug('office-important-note');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue