33 lines
838 B
PHP
33 lines
838 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class PictoBrand extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'title',
|
|
'picture',
|
|
'text',
|
|
];
|
|
|
|
// protected static function boot()
|
|
// {
|
|
// static::creating(function (EncartArg $encartArg) {
|
|
// if ($encartArg->picture) {
|
|
// $encartArg->picture = Utils::storeImage($encartArg->picture, $encartArg->getTable());
|
|
// }
|
|
// });
|
|
|
|
// static::updating(function (EncartArg $encartArg) {
|
|
// if ($encartArg->picture) {
|
|
// $encartArg->picture = Utils::storeImage($encartArg->picture, $encartArg->getTable());
|
|
// }
|
|
// });
|
|
// parent::boot();
|
|
// }
|
|
}
|