ldc-legaulois/app/Models/MomentStrates.php
Jérémy Munsch 34da0f98a1 tons of fix
2021-05-05 15:13:33 +02:00

26 lines
541 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class MomentStrates extends Model
{
protected $table = "moment_strates";
protected static function booted()
{
static::creating(function ($strate) {
$strate->content = clean($strate->content);
});
static::updating(function ($strate) {
$strate->content = clean($strate->content);
});
}
public function moment()
{
return $this->belongsTo('App\Models\Moments', 'moment_id');
}
}