New-OMIS/Modules/PMS/app/Models/Project.php

34 lines
648 B
PHP
Raw Normal View History

2024-04-16 16:59:18 +05:45
<?php
namespace Modules\PMS\Models;
use App\Traits\CreatedUpdatedBy;
use App\Traits\StatusTrait;
use Illuminate\Database\Eloquent\Model;
2024-04-16 17:14:39 +05:45
use Modules\Employee\Models\Employee;
2024-04-16 16:59:18 +05:45
class Project extends Model
{
use StatusTrait, CreatedUpdatedBy;
protected $table = 'tbl_projects';
protected $guarded = [];
protected $appends = ['status_name'];
const CATEGORY = [
10 => 'Vue',
11 => 'Laravel',
];
2024-04-16 17:14:39 +05:45
public function client()
{
return $this->belongsTo(Client::class, 'client_id');
}
public function members()
{
return $this->belongsTo(Employee::class, 'members_id');
}
2024-04-16 16:59:18 +05:45
}