Update Doctor Resource

This commit is contained in:
R
2022-09-23 08:36:30 +07:00
parent a67afc27b6
commit 5fe1dc4bc6
36 changed files with 92181 additions and 15 deletions

27
app/Models/District.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class District extends Model
{
use HasFactory;
protected $fillable = [
'id',
'city_id',
'name'
];
public function city()
{
return $this->belongsTo(City::class, 'city_id');
}
public function villages()
{
return $this->hasMany(Village::class, 'district_id');
}
}