Download the PHP package coryrose/livewire-tables without Composer

On this page you can find all versions of the php package coryrose/livewire-tables. 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 livewire-tables

Livewire-Tables

Latest Version on Packagist Total Downloads Build Status StyleCI

An extension for Livewire that allows you to effortlessly scaffold datatables with optional pagination, search, and sort.

Live demo website will be available soon.

Installation

Via Composer

The package will automatically register its service provider.

To publish the configuration file to config/livewire-tables.php run:

Usage

Livewire tables are created in three simple steps:

  1. Create a table component class
  2. Configure the table class using the available options
  3. Scaffold the table view (as needed when component class changes)

Create a table component class

Run the make command to generate a table class:

php artisan livewire-tables:make UsersTable

App/Http/Livewire/Tables/UsersTable.php

Configure the component options

First, set your base model in the model() method in the following format:

To eager load relationships, use the with() and return an array of relation(s):

The following are editable public properties for the table class:

key description value default
$paginate Controls whether the data query & results are paginated. If true, the class must use WithPagination; bool true
$pagination The number value to paginate with integer 10
$hasSearch Controls global appearance of search bar bool true
$fields The fields configuration for your table array null
$css Per-table CSS settings array null

$fields

Controls the field configuration for your table

key description value
title Set the displayed column title string
name Should represent the database field name. Use '.' notation for related columns, such as user.address string
header_class Set a class for the <th> tag for this field string or null
cell_class Set a class for the <td> tag for this field string or null
sortable Control whether or not the column is sortable bool or null
searchable Control whether or not the column is searchable bool or null

$css

Used to generate CSS classes when scaffolding the table.

These can be set globally in the configuration file, or on a per-table basis in the component class.

Note: CSS classes set in the component will override those from the configuration file where both exist.

key description value
wrapper CSS class for <div> surrounding table string or null
table CSS class for <table> string or null
thead CSS class for <thead> string or null
th CSS class for <th> string or null
tbody CSS class for <tbody> string or null
tr CSS class for <tr> string or null
td CSS class for <td> string or null
search_wrapper CSS class for <div> surrounding search string or null
search_input CSS class for search <input> string or null
pagination_wrapper CSS class for <div> surrounding pagination buttons string or null

Scaffold the table view

When ready, scaffold the table view using the scaffold command:

php artisan livewire-tables:scaffold UsersTable

resources/views/livewire/tables/users-table.blade.php

You can use the scaffold command continuously as you make changes to the parent component class.

Since the rendered template is simple HTML, there’s no need for table “slots” for customization - customize the template as you see fit!

Todo

Change log

Please see the changelog for more information on what has changed recently.

Contributing

Please see contributing.md for details and a todolist.

Credits

License

MIT. Please see the license file for more information.


All versions of livewire-tables with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ~5|~6
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 coryrose/livewire-tables contains the following files

Loading the files please wait ....