# Send a Pennant flag to a Vue page

> Feature::for($user)->active() becomes a boolean prop. The controller checks the same flag before it writes.

- URL: https://laravel-vuejs.space/laravel-pennant-feature-flag-vue
- Author: Anass Ez-zouaine (https://laravel-vuejs.space/author/anass-ez-zouaine)
- Published: 2026-10-11
- Topics: Laravel, VueJs

People searching “Laravel Pennant Vue” hide a button and let the POST through. A flag is a server check that you also copy into a prop. The [stack guide](https://laravel-vuejs.space/laravel-vue-in-2026) is the app this flag sits on.

> **TL;DR**
>
> -   Feature::for($user)->active() becomes a boolean prop.
> -   The controller checks the same flag before it writes.
> -   Do not send the flag list to the browser and trust a posted `newEditor: true`.
> -   Do not call the provider from the page to “evaluate the flag”.
>
> **Who it's for:** Laravel + Vue developers
>
> **Applies to:** Laravel 13 · Vue 3

## The fix

```shell
composer require laravel/pennant
```

```php
use Laravel\Pennant\Feature;

Feature::define('new-editor', function (User $user) {
    return (bool) $user->is_admin;
});
```

Define that in a service provider, not in the Vue page.

```php
$enabled = $request->user()
    ? Feature::for($request->user())->active('new-editor')
    : false;

return Inertia::render('posts/Edit', [
    'newEditor' => $enabled,
]);
```

```vue
<section v-if="newEditor">New editor</section>
```

The store method checks `active('new-editor')` again before it writes. Do not send the flag list to the browser and trust a posted `newEditor: true`. Do not call the provider from the page to “evaluate the flag”.

## FAQ

**Q: How do I send a Pennant flag to a Vue page?**

Feature::for($user)->active() becomes a boolean prop. The controller checks the same flag before it writes.

**Q: What goes wrong with Laravel Pennant Vue?**

Many developers hide a button and let the POST through. Do not send the flag list to the browser and trust a posted `newEditor: true`.
