mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-19 12:34:01 +00:00
31 lines
546 B
PHP
31 lines
546 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
/**
|
|
* Class State
|
|
* @package App\Models
|
|
*
|
|
* @property \App\Models\Country country_id
|
|
* @property string name
|
|
*/
|
|
class State extends AbstractModel
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'states';
|
|
|
|
protected $dates = ['deleted_at'];
|
|
|
|
/**
|
|
* @return BelongsTo
|
|
*/
|
|
public function country(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Country::class, 'country_id', 'id');
|
|
}
|
|
}
|