2021-07-20 16:34:27 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2021-07-21 15:03:37 +02:00
|
|
|
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'
|
|
|
|
|
];
|
2021-07-21 15:03:37 +02:00
|
|
|
|
2022-09-03 16:56:16 +02:00
|
|
|
/**
|
|
|
|
|
* BelongsTo customer relation
|
|
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
|
|
|
*/
|
2022-08-25 12:26:43 +02:00
|
|
|
public function customer()
|
|
|
|
|
{
|
2021-07-21 15:03:37 +02:00
|
|
|
return $this->belongsTo(Customers::class);
|
|
|
|
|
}
|
2021-07-20 16:34:27 +02:00
|
|
|
}
|