26 lines
574 B
PHP
26 lines
574 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\Relations\HasOne;
|
|
|
|
class Audition extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
public function event(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Event::class);
|
|
}
|
|
|
|
public static function deadlineNotPast()
|
|
{
|
|
return Audition::where('entry_deadline', '>=', now())->get();
|
|
}
|
|
|
|
// TODO add order column to be able to sort in score order
|
|
}
|