megacommit
This commit is contained in:
parent
2451ab45cb
commit
34ed81516b
51 changed files with 1200 additions and 251 deletions
|
@ -41,12 +41,17 @@ class Showing extends Model
|
|||
return $this->belongsTo(Movie::class, 'movie_id', 'movie_id');
|
||||
}
|
||||
|
||||
public function prices()
|
||||
{
|
||||
return $this->hasMany(Price::class, 'showing_id', 'showing_id');
|
||||
}
|
||||
|
||||
public function nowPlaying()
|
||||
{
|
||||
return $this->where('showing_start', '>=', now())->get();
|
||||
}
|
||||
|
||||
public function end_time() {
|
||||
public function showing_end() {
|
||||
$date = new Carbon($this->showing_start);
|
||||
$date->addMinutes($this->movie->movie_length);
|
||||
return $date;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue