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

ActiveLibrary

samigitz/nova-detached-actions
==============================

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

2.1.4(1y ago)095MITVuePHP &gt;=8.0

Since Mar 14Pushed 1y agoCompare

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

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

Project Title
=============

[](#project-title)

A brief description of what this project does and who it's for

[![Latest Version on Packagist](https://camo.githubusercontent.com/4e211aa530c6d90c9660b6078402b706cbca2a71fdbaac38a1915b326d7a78b4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73616d696769747a2f6e6f76612d64657461636865642d616374696f6e732e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/samigitz/nova-detached-actions)[![Total Downloads](https://camo.githubusercontent.com/6152c34985bf683aa60f61dfaad0284c6b098964400bbe171bc87711b3818334/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73616d696769747a2f6e6f76612d64657461636865642d616374696f6e732e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/samigitz/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 [gobrightspot/nova-detached-actions](https://github.com/gobrightspot/nova-detached-actions) abandoned repo, i rewrite a lot of part in using vue 3 composition api.

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

Version support
---------------

[](#version-support)

- Nova 4|5
- Laravel ^8

---

[![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 samigitz/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 `Samigitz\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:

```
