PHPackages                             digital-creative/batch-edit-toolbar - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. digital-creative/batch-edit-toolbar

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

digital-creative/batch-edit-toolbar
===================================

Allows you to update a single column of a resource all at once.

v0.0.4(2y ago)91.4k↓75%[2 issues](https://github.com/dcasia/batch-edit-toolbar/issues)MITVuePHP &gt;=8.1

Since Oct 4Pushed 2y ago2 watchersCompare

[ Source](https://github.com/dcasia/batch-edit-toolbar)[ Packagist](https://packagist.org/packages/digital-creative/batch-edit-toolbar)[ GitHub Sponsors](https://github.com/milewski)[ RSS](/packages/digital-creative-batch-edit-toolbar/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Batch Edit Toolbar
==================

[](#batch-edit-toolbar)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3f0bbb521f17037fa71dfe9dc353ed44458415b1501bb45c1bc4f997737fc666/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6469676974616c2d63726561746976652f62617463682d656469742d746f6f6c626172)](https://packagist.org/packages/digital-creative/batch-edit-toolbar)[![Total Downloads](https://camo.githubusercontent.com/1a3f582b0dc5d89b7ccc22388d96e7ddb1696c93c77adac296ad111f9b703de6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6469676974616c2d63726561746976652f62617463682d656469742d746f6f6c626172)](https://packagist.org/packages/digital-creative/batch-edit-toolbar)[![License](https://camo.githubusercontent.com/9ad72c23a9322ef05b577ce0740d5853fa7481881eac253727f5c7fb67f43880/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6469676974616c2d63726561746976652f62617463682d656469742d746f6f6c626172)](https://github.com/dcasia/batch-edit-toolbar/blob/main/LICENSE)

  ![Batch Edit Toolbar in Action](https://raw.githubusercontent.com/dcasia/batch-edit-toolbar/main/screenshots/light.png)Allows you to update a single column of a resource all at once directly from the index page.

Installation
============

[](#installation)

You can install the package via composer:

```
composer require digital-creative/batch-edit-toolbar

```

Basic Usage
-----------

[](#basic-usage)

To use the new functionality all you need to do is to add the `batchEditable` method to your field definition, this method should return an array containing the options as defined below.

```
class UserResource extends Resource
{
    public function fields(NovaRequest $request): array
    {
        return [
            Text::make('Title', 'title')
                ->rules('required')
                ->batchEditable(fn () => [
                    'icon' => 'annotation', // accepts any heroicon name supported by Nova: https://v1.heroicons.com

                    /**
                     * These are all optional, and the current values are the default ones
                     */
                    'tooltip' => 'Update {attribute}', // Appears when hovering the icon.
                    'title' => 'Update {attribute}', // Appears in the modal title.
                    'cancelButtonText' => 'Cancel', // Appears in the modal cancel button.
                    'confirmButtonText' => 'Update', // Appears in the modal confirm button.
                    'confirmText' => null, // Appears above the field in the modal.
                    'modalSize' => '2xl', // Can be "sm", "md", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "6xl", "7xl".
                    'modalStyle' => 'window', // Can be either 'fullscreen' or 'window'.
                ]),

            /**
             * You can also use a custom SVG icon directly
             */
            Text::make('Description', 'description')
                ->rules('required')
                ->batchEditable(fn () => [
                    'icon' =>
