svoydom/app/Models/Event.php

23 lines
401 B
PHP
Raw Permalink Normal View History

2023-05-17 09:57:20 +03:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Event extends Model
{
use HasFactory;
protected $fillable=['project_id','image','date'];
protected $casts = [
'date' => 'date:d.m.Y',
];
public function translations()
{
return $this->hasMany(EventTranslation::class);
}
}