ldc-portsalaries/app/Models/Planning.php
2021-06-07 18:28:25 +02:00

38 lines
687 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Planning extends Model
{
use HasFactory;
protected $fillable = [
'start',
'end',
'data'
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'start' => 'datetime',
'end' => 'datetime',
'data' => 'array'
];
/**
* Has one Employee
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function employee()
{
return $this->belongsTo(Employee::class);
}
}