Установка статуса "В архиве" при создании информации о карте

This commit is contained in:
brusnitsyn
2025-12-18 22:52:36 +09:00
parent 3f4a0d4c59
commit 6b670c4d29

View File

@@ -6,6 +6,14 @@ use Illuminate\Database\Eloquent\Model;
class ArchiveInfo extends Model class ArchiveInfo extends Model
{ {
protected static function booted()
{
static::creating(function (ArchiveInfo $model) {
$model->status_id = 2;
});
}
protected $connection = 'pgsql'; protected $connection = 'pgsql';
protected $table = 'archive_infos'; protected $table = 'archive_infos';
protected $fillable = [ protected $fillable = [