ldc-jeusselin/app/Models/Employees.php
Olivier Legat 37f5807f11 update integration
nos metiers -  Work in progress (interrompu)
2021-02-18 17:29:54 +01:00

30 lines
590 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Employees extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'civility',
'firstname',
'lastname',
'job_title',
'photo',
'video',
];
public function businessSectors()
{
return $this->belongsToMany(BusinessSector::class, 'sectors_employees', 'employee_id', 'business_sector_id');
}
}