# Reject a Vue form that edited a stale row

> Send updated_at with the form and compare it before you write. Do not use HTTP 409 for that.

- URL: https://laravel-vuejs.space/laravel-updated-at-check-vue
- Author: Anass Ez-zouaine (https://laravel-vuejs.space/author/anass-ez-zouaine)
- Published: 2026-10-11
- Topics: Laravel, VueJs, Inertia

People searching “Laravel optimistic lock Vue” want two editors to stop overwriting each other. Send the `updated_at` you rendered, and refuse the write when it no longer matches. This is not an Inertia visit feature. It is a check in the controller. The [CRUD guide](https://laravel-vuejs.space/laravel-inertia-vue-crud) is the form.

> **TL;DR**
>
> -   Send updated\_at with the form and compare it before you write.
> -   Do not use HTTP 409 for that.
> -   Do not `abort(409)` here.
> -   Do not compare a date string you formatted for humans.
>
> **Who it's for:** Laravel + Vue developers on Inertia
>
> **Applies to:** Laravel 13 · Inertia 3 · Vue 3

## The fix

```php
$validated = $request->validate([
    'title' => ['required', 'string', 'max:120'],
    'updated_at' => ['required', 'date'],
]);

if (! $post->updated_at->equalTo($request->date('updated_at'))) {
    return back()->withErrors([
        'title' => 'This post changed. Reload and try again.',
    ]);
}

$post->update(['title' => $validated['title']]);
```

The Vue form sends the prop, not the clock on the laptop:

```vue
<input type="hidden" name="updated_at" :value="post.updated_at" />
```

## What to avoid

> **Gotcha**
>
> Do not `abort(409)` here. Inertia uses 409 when the asset version changed after a [deploy](https://laravel-vuejs.space/deploy-laravel-vue), and the client reloads instead of showing the error bag. Do not compare a date string you formatted for humans. Compare the timestamp the model cast.

## FAQ

**Q: How do I reject a Vue form that edited a stale row?**

Send updated\_at with the form and compare it before you write. Do not use HTTP 409 for that.

**Q: What goes wrong with Laravel optimistic lock Vue?**

Many developers want two editors to stop overwriting each other. Do not `abort(409)` here.
