<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Team extends Model
{
    protected $fillable = ['name', 'short_name', 'flag'];
    
    public function homeMatches()
    {
        return $this->hasMany(Event::class, 'team_a_id');
    }
    public function awayMatches()
    {
        return $this->hasMany(Event::class, 'team_b_id');
    }
}
