PHPackages                             saintsystems/nova-detached-actions - 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. saintsystems/nova-detached-actions

ActiveLibrary

saintsystems/nova-detached-actions
==================================

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

5.0.0(8mo ago)0414↑150%MITJavaScriptPHP &gt;=8.1

Since Sep 5Pushed 8mo agoCompare

[ Source](https://github.com/saintsystems/nova-detached-actions)[ Packagist](https://packagist.org/packages/saintsystems/nova-detached-actions)[ RSS](/packages/saintsystems-nova-detached-actions/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

[![Latest Version on Packagist](https://camo.githubusercontent.com/44e139f7fe2512288a7dd0041fe23d4914366086dc4e99a7830f085d5943a5fd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7361696e7473797374656d732f6e6f76612d64657461636865642d616374696f6e732e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/saintsystems/nova-detached-actions)[![Total Downloads](https://camo.githubusercontent.com/4eeb7066eac9bb33f6b84df9883bf6d3e06abc824bc7c6da5e1baf34c567cdfc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7361696e7473797374656d732f6e6f76612d64657461636865642d616374696f6e732e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/saintsystems/nova-detached-actions)

Laravel Nova Detached Actions Tool
==================================

[](#laravel-nova-detached-actions-tool)

A Laravel Nova tool to allow for placing actions in the Nova toolbar, detached from the checkbox selection mechanism.

The action is detached from the row selection checkboxes in the resource table, so you will not have a collection of models to iterate over. Detached actions are intended to be independent of the selection in the table.

This is a fork of [datomatic/nova-detached-actions](https://github.com/datomatic/nova-detached-actions) made to work as a mixin and not override the base ResourceTableToolbar to ensure compatibility with other plugins like `icon-action-toolbar`.

⚠️ Pivot actions are not supported and have not been tested.

[![actions](branding/actions.jpg)](branding/actions.jpg)

Mobile compatibility

[![mobile actions](branding/mobile_actions.jpg)](branding/mobile_actions.jpg)

Installation
------------

[](#installation)

You can install the package in to a Laravel app that uses [Nova](https://nova.laravel.com) via composer:

```
composer require saintsystems/nova-detached-actions
```

The tool will be automatically registered via the `ToolServiceProvider`

Usage
-----

[](#usage)

Create a custom Nova Action file:

```
php artisan nova:action ExportUsers
```

Instead of extending the `ExportUsers` class with the `Laravel\Nova\Actions\Action` class, swap it with the `SaintSystems\Nova\Tools\DetachedActions\DetachedAction` class.

Since we won't receive a collection of `$models`, you can remove the variable from the `handle` method, so that the signature is `public function handle(ActionFields $fields)`.

After registration the detached action will appear on the Index Toolbar.

Here's a full example:

```
