Download the PHP package okipa/laravel-bootstrap-table-list without Composer

On this page you can find all versions of the php package okipa/laravel-bootstrap-table-list. 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 laravel-bootstrap-table-list

Laravel Bootstrap Table List

Source Code Latest Version Total Downloads License: MIT Build Status Code Coverage Scrutinizer Code Quality

Because it is sometimes convenient to build a simple backoffice without sophisticated javascript treatments, Laravel Bootstrap Table List proposes a model-based and highly customizable php table list generation, that simply render your table HTML in your view, with a code-side-configuration.

:warning::warning::warning: This package has been replaced by https://github.com/Okipa/laravel-table. :warning::warning::warning:
:warning::warning::warning: Only bug fixes will be merged. Please consider moving to the new package. :warning::warning::warning:


Before use

This V2 of this table list generator is pre-configured for Bootstrap 4 and Fontawesome 5.
However, this package is deeply configurable and it is possible to easily set it up for Bootstrap 3 and other versions of FA or other icon libraries (or not icon at all).
If the configuration does not give enough possibilities for your customization needs, you definitely should publish the templates and customize them in your project.

Notes:
If someone is motivated to give me a functional configuration for bootstrap 3, I will include it in the readme. It could interest some developers.
Anyway, a pre-configured bootstrap 3 version of this package does exists (with less features) : please check the v1.


Installation


Package usage

Basic usage

In your controller, simply call the package like the following example to generate your table list :

Then, send your $table object in your view and render your table list :

That's it !

Notes :

Advanced usage

If you need your table list for a more advanced usage, with a multilingual project for example, here is an example of what you can do in your controller :


API

TableList public methods

public function setModel(string $tableModel): \Okipa\LaravelBootstrapTableList\TableList

Set the model used for the table list generation (required).

public function setRequest(Request $request): \Okipa\LaravelBootstrapTableList\TableList

Set the request used for the table list generation (required).

public function setRoutes(array $routes): \Okipa\LaravelBootstrapTableList\TableList

Set the routes used for the table list generation (required) :

public function setRowsNumber(int $owsNumber): TableList

Set a custom number of rows for the table list (optional).

public function enableRowsNumberSelector(): TableList

Enables the rows number selection in the table list (optional) :

public function addQueryInstructions(Closure $queryClosure): TableList

Set the query closure that will be used during the table list generation (optional).
For example, you can define your joined tables here.
The closure let you manipulate the following attribute : $query`.

public function disableLines(Closure $disableLinesClosure, array $lineClass = []): TableList

Set the disable lines closure that will be executed during the table list generation (optional).
The optional second param let you set the class that will be applied for the disabled lines.
By default, the config('tablelist.value.disabled_line.class') config value is applied.
For example, you can disable the current logged user to prevent him being edited or deleted from the table list.
The closure let you manipulate the following attribute : $model.

public function highlightLines(Closure $highlightLinesClosure, array $lineClass = []): TableList

Set the highlight lines closure that will executed during the table list generation (optional).
The optional second param let you set the class that will be applied for the highlighted lines.
By default, the config('tablelist.value.highlighted_line.class') config value is applied.
The closure let you manipulate the following attribute : $model.

public function addColumn(string $attribute = null) : TableList

Add a column that will be displayed in the table list (required) :

TableListColumn public methods

public function setTitle(string $title): TableListColumn

Set the column title (optional).

public function sortByDefault(string $direction = 'asc'): TableListColumn

Set the default sorted column (required).

public function useForDestroyConfirmation(): TableListColumn

Use the column attribute for the destroy confirmation message generation (required) :

public function isSortable(): TableListColumn

Make the column sortable (optional).

public function isSearchable(): TableListColumn

Make the column searchable (optional).

public function setCustomTable(string $customColumnTable, string $customColumnTableRealAttribute = null): TableListColumn

Define the custom related table for the column attribute (optional).
Defining the custom related table becomes mandatory if you define your column as searchable and if the column attribute does not directly belong to the table list model table. The custom real attribute will only be used for the sql request and will also be required only if the defined column attribute does not directly exist in the defined custom table.

Examples :

public function setColumnDateTimeFormat(string $columnDateFormat): TableListColumn

Set the format for a datetime, date or time attribute (optional).
(Carbon::parse($value)->format($format) method is used under the hood).

public function isButton(array $buttonClass = []): TableListColumn

Set the column button class (optional).
The attribute is wrapped into a button.

public function setIcon(string $icon, $showWithNoValue = false): TableListColumn

Set the icon to display before the value (optional).

public function setStringLimit(int $stringLimit): TableListColumn

Set the string value display limitation (optional).
Shows "..." when the limit is reached....ravel-bootstrap-table-list/src/Traits/RoutesValidationChecks.php

public function isLink($url = null): TableListColumn

Set the link url.
You can declare the link as a string or as a closure which will let you manipulate the following attributes : $entity, $column.
If no url is declared, it will be set with the column value.

public function isCustomValue(Closure $customValueClosure): TableListColumn

Set a custom value in the method closure (optional).
The closure let you manipulate the following attributes : $entity, $column.

public function isCustomHtmlElement(Closure $customHtmlEltClosure): TableListColumn

Set the HTML element to render in the method closure (optional).
The closure let you manipulate the following attributes : $entity, $column.


Configurations

To personalize the package configuration, you have to publish it first with the following script :

Then, open the published package configuration file (config/tablelist.php) and override the default table list configuration by setting your own values.


Customize translations

You can customize the table list associated translation by publishing them in your project :

Once you have published them, You will find them in your resources/lang directory.


Customize templates

Publish the package blade templates file in your project :

Then, change the content from the package templates in your resources/views/vendor/tablelist directory.


Testing


Changelog

Please see CHANGELOG for more information on what has changed recently.


Contributors


License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-bootstrap-table-list with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
illuminate/support Version ~5.0
okipa/laravel-html-helper Version ^1.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 okipa/laravel-bootstrap-table-list contains the following files

Loading the files please wait ....