Download the PHP package almirhodzic/nova-sortable-5 without Composer

On this page you can find all versions of the php package almirhodzic/nova-sortable-5. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nova-sortable-5

Nova Sortable 5

Nova Sortable 5

A Laravel Nova 5 package for drag-and-drop and arrow-based sorting of resources.

Table of Contents

Requirements

Installation

The service provider is auto-discovered. No manual registration needed.

Publish the config (optional)

This creates config/frontbyte-nova-sortable.php where you can set global defaults.

Setup

1. Add a sort column to your table

New table:

Existing table — create a migration to add the column:

Then run the migration:

After migrating, you can initialize the order values for existing rows:

2. Add the trait to your Eloquent Model

The $sortableColumn property is optional. If omitted, it uses the default_column from the config (default: order).

3. Add the trait and field to your Nova Resource

The SortableResource trait ensures Nova sorts by your sortable column by default, preventing conflicts with drag-and-drop.

Tip: If you're adding this package to an existing resource with pre-existing rows, their sort_order values will initially all be 0. Simply perform a single drag-and-drop reorder in the admin panel — the package will automatically recalculate and persist the sort_order for all rows in the table.

Configuration

After publishing, edit config/frontbyte-nova-sortable.php:

All config values serve as global defaults. You can override them per field (see below).

Field Options

You can override config defaults per resource by chaining methods on the Sortable field:

Method Description
showDragHandle() / hideDragHandle() Toggle drag handle visibility
showSortArrows() / hideSortArrows() Toggle arrow buttons
showOrderNumber() / hideOrderNumber() Toggle order number display
showToast() / hideToast() Toggle success/error toast messages

Auto-assign order on create

By default, the package automatically assigns the next order value (max + 1) when creating a new model. This means every new entry is added to the end of the list.

If you want to control the order value manually (e.g. via a form field), you can disable this:

With auto-assign disabled, you are responsible for setting the sort_order value yourself:

How it works

Drag-and-drop: Grab the bars icon and drag a row to its new position. All affected rows are reordered in a single API call.

Arrow buttons: Click the up/down arrows to swap a row with its neighbor. Only the two affected rows are swapped.

Visual feedback: After sorting, the moved row flashes green and the displaced row flashes red — providing clear visual confirmation of what changed.

No page reload: All updates happen via API calls with instant DOM manipulation. The order numbers update automatically.

Model Features

The HasSortableRows trait provides:

License

MIT License. See LICENSE for details.


All versions of nova-sortable-5 with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package almirhodzic/nova-sortable-5 contains the following files

Loading the files please wait ...