PowerGrid creates modern, powerful, and easy-to-customize Datatables based on the Laravel Livewire library.
With PowerGrid you get right out of the box:
You can install this package via composer by running this command in the terminal.
composer require power-components/livewire-powergrid
Create a PowerGrid Table
Important You must have PowerGrid installed and properly configured before proceeding.
To create a PowerGrid table, run the following command:
php artisan powergrid:create
Now, answer the question on your screen to complete the creation process:
1. Enter the name of your PowerGrid Component.
2. Indicate if your component will use a Model or a Collection as a data source.
M for Model or
C for Collection.
This example uses the Dish Model, so we typed
3. If you choose Model, enter the path to your Model.
In this example, the Dish Model is located at
If you don’t specify
App\Models -powergrid will create based on the default App\Models directory.
4. Use Fillable?
PowerGrid can create columns based on your Model’s
Supported databases are MySQL, Postgre, and SQLite.
If desirable, type
yes to use this feature.
If you don’t use the ‘id’ column as the primary key, you should make sure your model is
protected $primaryKey = null;.
⚡ PowerGrid Table created!
PowerGrid indicates the location where your new Table component was created.
This package has a lot more features with code examples, If you want to dig more you can visit its complete documentation on Github.
Published at : 11-04-2022
I am a highly results-driven professional with 12+ years of collective experience in the grounds of web application development especially in laravel, native android application development in java, and desktop application development in the dot net framework. Now managing a team of expert developers at Codebrisk.