| Current File : /var/www/orientalss.com/app/Models/ManageManpower.php |
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Laravel\Scout\Searchable;
class ManageManpower extends Model
{
use HasFactory, Searchable;
protected $guarded = [];
public function toSearchableArray()
{
return [
'project_id'=>$this->project_id,
'employee_id'=>$this->employee_id,
];
}
public function getEmployeeName(){
return $this->belongsTo(EmployeeRegistration::class,'employee_id')->select('name');
}
}