Download the PHP package bytestechnolabs/datagrid without Composer

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

Custom DataGrid

Custom DataGrid is a powerful Laravel package that simplifies the process of creating dynamic grids with minimal code. With features like Bootstrap 5 compatibility, CSV and TSV exporting, sorting, searching, and inline or bulk actions, managing tabular data becomes a breeze. This README will guide you through the installation and configuration process, ensuring you harness the full potential of Custom DataGrid.

Table of Contents

About this project

Custom DataGrid offers a streamlined approach to building robust grids for your Laravel application. Its simplicity in setup and flexibility in customization make it a preferred choice for developers aiming to enhance their data management capabilities.

Compatibility

Custom DataGrid is fully compatible with Laravel 10, ensuring seamless integration with your existing projects.

Installation

To begin using Custom DataGrid, follow these simple steps:

  1. Add Dependency:You can install the package via Composer. Run the following command in your terminal:

  2. Service Provider: Add the Custom DataGrid service provider to your Laravel application's config/app.php file:

  3. Publish Configuration: Execute php artisan vendor:publish --provider="Datagrid\DatagridServiceProvider" to publish the configuration files.

  4. Autoload: Refresh the Composer autoload files by running composer dump-autoload.

  5. Include Assets: Include the necessary JavaScript and CSS dependencies in your HTML to enable Custom DataGrid functionality.
  6. Storage link with public :

Dependencies

Make sure to have the following dependencies installed and configured:

Usage

A Simple Example

Let's walk through a basic example of implementing Custom DataGrid in your Laravel application.

Ensure to replace User::class with your model in the DataGridFacade::model() call.


Using Configuration for Data Grid in Laravel

To utilize the configuration for the data grid in Laravel, follow the steps outlined below:

1. Define Unique Session Key

In your controller method (index() in this case), retrieve the unique session key from the configuration file. This key is used to manage sessions related to the specific table.

2. Retrieve Selected Columns

Retrieve the selected columns from the session using the unique session key obtained in the previous step.

3. Set Default Columns if Session Data is Not Set

If the session data for selected columns is not set, use the default columns specified in the configuration file and store them in the session.

4. Get All Available Columns

Retrieve all available columns from the configuration file.

5. Render Data Grid

Render the data grid using the Laravel Data Grid package, specifying the selected columns, search columns, and all available columns. Optionally, paginate the results.

6. Pass Data to View

Pass the data grid to the view for rendering.

By following these steps, you can effectively utilize the configuration for the data grid in your Laravel application.


Configuration for Multiple Tables

To configure multiple tables and specify their unique columns and session keys, follow these steps:

1. Define Table Columns

In the config/datagrid.php file, specify the columns for each table under the users_columns array. Each table should have its own array containing the column names.

Example:

2. Specify Unique Column

Define the unique column for each table using the format ModelName_unique_column. This configuration is used to validate uniqueness when updating records.

Example:

3. Set Session Key

Assign a unique session key for each table using the format ModelName_SessionKey. This key is used to manage sessions related to the specific table.

Example:

4. Enable or Disable Edit Option

Specify whether the table has an edit option available. Set to true if the table allows editing, otherwise set to false.

Example:

Repeat these steps for each table you want to configure. Ensure that the configuration is accurate and consistent across all tables.


Blade File Example

To include the package's view in your Laravel application, follow these steps:

  1. Create a new blade file (e.g., datagrid.blade.php) in your resources/views directory.

  2. Add the following code to the blade file:

  3. Make sure to include all the necessary styles and render the data grid using the render() method provided by the package.

  4. You can then use this blade file in your application to display the data grid provided by the package.

The result will be like this: datagrid


All versions of datagrid with dependencies

PHP Build Version
Package Version
No informations.
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 bytestechnolabs/datagrid contains the following files

Loading the files please wait ....