mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-07-30 02:16:47 -04:00
22 lines
441 B
PHP
22 lines
441 B
PHP
<?php
|
|
|
|
namespace Modules\Setup\Entities;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
class State extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $guarded = ['id'];
|
|
|
|
public function country(){
|
|
return $this->belongsTo(Country::class,'country_id','id');
|
|
}
|
|
|
|
public function cities(){
|
|
return $this->hasMany(City::class,'state_id','id')->orderBy('name');
|
|
}
|
|
}
|