ldc-doux/app/Models/Slide.php
Sebastien Hattry 8837dd4f58 Create BO 1
2021-12-06 08:51:51 +01:00

37 lines
662 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Slide extends Model
{
use HasFactory;
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'date_start' => 'datetime',
'date_end' => 'datetime',
];
protected $fillable = [
'title',
'text',
'link_label',
'link',
'link_new_tab',
'slider_id',
'date_start',
'date_end'
];
public function slider()
{
return $this->belongsTo(Slider::class);
}
}