33 lines
685 B
PHP
33 lines
685 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Naturalization extends Model
|
|
{
|
|
use HasFactory, SoftDeletes;
|
|
|
|
protected $table = 'naturalization';
|
|
protected $primaryKey = 'naturalization_id';
|
|
|
|
protected $fillable = [
|
|
'person_id',
|
|
'date_of_naturalisation',
|
|
'no_of_cert',
|
|
'issued_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'date_of_naturalisation' => 'date',
|
|
];
|
|
|
|
// Relationship
|
|
public function person()
|
|
{
|
|
return $this->belongsTo(Person::class, 'person_id');
|
|
}
|
|
}
|