fix for default weekday
This commit is contained in:
parent
03aaf21519
commit
f2970e4c0a
@ -22,7 +22,11 @@ class UserSubjectsController extends Controller
|
||||
$weekdays = ['Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota', 'Niedziela'];
|
||||
// $types = ['Lecture', 'Excercises', 'Labs', 'Other'];
|
||||
$defaultTime = date("H:i");
|
||||
if(date('w')-1 < 0 ) {
|
||||
$defaultWeekday = $weekdays[6];
|
||||
} else {
|
||||
$defaultWeekday = $weekdays[date('w')-1];
|
||||
}
|
||||
return view('user.user_subjects', ['subjects' => $subjects, 'weekdays' => $weekdays,
|
||||
'subjects_grouped' => $subjects_grouped, 'grouped_by' => $groupBy, 'defaultTime' => $defaultTime, 'defaultWeekday' => $defaultWeekday, 'rooms' => $rooms]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user