ldc-cocotte/app/Models/Salarie.php

45 lines
892 B
PHP
Raw Normal View History

2021-07-20 16:34:27 +02:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\Customers;
2021-07-20 16:34:27 +02:00
class Salarie extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'matricule',
'nom', 'prenom',
'code',
'start_date', 'end_date', 'etablissement', 'site', 'service'
2021-07-20 16:34:27 +02:00
];
2022-09-08 13:02:16 +02:00
/**
* BelongsTo customer relation
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
2022-09-08 11:29:39 +02:00
public function customer()
{
return $this->belongsTo(Customers::class);
}
/**
* belongsTo magasin relation
*
* @return \Illuminate\Database\Eloquent\Relations\belongsTo
*/
public function magasin()
{
return $this->belongsTo(Magasin::class);
}
2021-07-20 16:34:27 +02:00
}