New-OMIS/app/Models/Location/Location.php
2024-04-05 11:07:15 +05:45

31 lines
582 B
PHP

<?php
namespace App\Modules\Models\Location;
use App\Modules\Models\Registration\Registration;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Location extends Model
{
use HasFactory;
protected $table = 'tbl_locations';
protected $fillable = [
'name',
'slug',
'email',
'password',
'description',
'status',
'user_id',
];
public function registrations()
{
return $this->hasMany(Registration::class,'preffered_location','slug');
}
}