Skip to content

Table Reference Name โ€‹

$tableName identifies a table instance. Events, persist keys, cache tags, and several plugins include it in their names.

Required unique name โ€‹

public string $tableName starts empty. mount() throws TableNameCannotCalledDefault when it is blank or the string default.

php artisan powergrid:create sets $tableName for you. If you write the class by hand, set it yourself. Use a unique value per table. CamelCase without spaces or special characters is a good convention.

phpapp/Livewire/ProductTable.php
use PowerComponents\LivewirePowerGrid\PowerGridComponent;

class ProductTable extends PowerGridComponent
{
    public string $tableName = 'productTable'; 
}

Created By Luan Freitas and @DanSysAnalyst