<?php

namespace App\Models\City;

use Illuminate\Database\Eloquent\Model;

class Country extends Model
{
    
    protected $fillable = [
        'id',
        'name',
        'code',
        'phone',
    ];
    protected $table = 'countries';
    public function states(){
        return $this->hasMany('App\Models\City\State');
   }
   
   public function statesWithCities(){
        return $this->states()->with('cities');
   }
}
