mapper wip
This commit is contained in:
1 parent
16cc214db6
commit
d635ebe563
38 files changed
+98
-680
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Scopes\SportScope;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Event extends Model
|
||||
@@ -23,6 +24,11 @@ class Event extends Model
|
||||
'away_id',
|
||||
];
|
||||
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::addGlobalScope(new SportScope);
|
||||
}
|
||||
|
||||
public function sport()
|
||||
{
|
||||
return $this->belongsTo(Sport::class);
|
||||
|
||||
Reference in new issue
Block a user