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