mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
This commit is contained in:
parent
c67a182cf2
commit
b4b6286172
89 changed files with 672 additions and 666 deletions
|
|
@ -38,10 +38,8 @@ class Playlist extends Model
|
|||
}
|
||||
|
||||
// Check weekday
|
||||
if ($this->weekdays !== null) {
|
||||
if (! in_array(now()->dayOfWeek, $this->weekdays)) {
|
||||
return false;
|
||||
}
|
||||
if ($this->weekdays !== null && ! in_array(now()->dayOfWeek, $this->weekdays)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->active_from !== null && $this->active_until !== null) {
|
||||
|
|
@ -53,10 +51,8 @@ class Playlist extends Model
|
|||
if ($now >= $this->active_from || $now <= $this->active_until) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if ($now >= $this->active_from && $now <= $this->active_until) {
|
||||
return true;
|
||||
}
|
||||
} elseif ($now >= $this->active_from && $now <= $this->active_until) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue