Download the PHP package starter-solutions/inertia-data-table without Composer

On this page you can find all versions of the php package starter-solutions/inertia-data-table. 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 inertia-data-table

starter-solutions/inertia-data-table

Laravel backend for server-driven data tables with Inertia.js. It adds a dataTable() macro to Eloquent builders, query builders, and collections and works with @starter-solutions/inertia-data-table-vue.

Features

Installation

Laravel discovers the service provider automatically. To customize parameter names, middleware, or defaults, publish the configuration:

Quick start

Declare the columns the frontend may sort by:

Return the paginator as an Inertia prop:

The tableKey must match the key passed to the Vue useDataTable() composable.

Allowed sorts

allowed_sorts has three distinct states:

Prefer an explicit #[AllowedSorts] attribute in production:

You can override the model attribute for one table:

Invalid configured columns or relation paths are ignored and logged as structured warnings. The response reports sort_by: null when a requested sort could not be applied.

Sorting related models

Sortable fields are resolved automatically from eager-loaded models:

The resolved public keys include author.name and author.email. Nested eager loads such as author.profile.company.name are resolved recursively.

Automatic relation sorting supports singular BelongsTo, HasOne, HasOneThrough, and MorphOne relations. A multi-value relation such as HasMany needs a custom sort callback so the aggregate or selected row is explicit.

Sorting accessors and aliases

Map an accessor's public key to its backing database column:

The frontend uses display_name; SQL orders by name.

Custom sort callbacks

For one-off SQL expressions, pass a keyed closure:

PHP attributes cannot contain closures. Use an invokable class for reusable or attribute-based custom sorts:

Sort classes are resolved through Laravel's container and may use constructor injection. Callback sorts must have a public string key.

Filtering and additional metadata

The filter callback receives the active filter values. Extra values can be returned beside the pagination metadata:

Vue can read this with additional or getAdditional('filters.statuses', []).

Query builders and collections

The macro is also available on the database query builder:

Collections are filtered, sorted, and paginated in memory. Dot notation works for nested values:

Relation discovery, accessor aliases, and SortCallback classes apply only to Eloquent builders.

Multiple tables

Use a unique table key and prop for each table:

Only the table identified by the request's tableKey consumes URL query state. Other tables use their independent session state.

JsonResource wrapping

Both flat paginator data and Laravel resource collections are supported by the Vue package:

Configuration

Published config/inertia-data-table.php options include:

License

MIT © Starter Solutions


All versions of inertia-data-table with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/pagination Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
inertiajs/inertia-laravel Version ^2.0|^3.0
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 starter-solutions/inertia-data-table contains the following files

Loading the files please wait ...