public static function boot() { parent::boot(); static::creating(function ($entry) { if (!$entry->isValid()) { return false; } }); static::updating(function ($entry) { if (!$entry->isValid()) { return false; } }); }