Skip to content

Commit

Permalink
docs: fix usage section missing data table factory aware trait
Browse files Browse the repository at this point in the history
  • Loading branch information
Kreyu committed Feb 20, 2024
1 parent 6f8b516 commit ed26b40
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/src/docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ In order to be able to paginate, sort, filter, personalize or export the data ta
```php
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Kreyu\Bundle\DataTableBundle\DataTableFactoryAwareTrait;

class ProductController extends AbstractController
{
use DataTableFactoryAwareTrait;

public function index(Request $request)
{
$dataTable = $this->createDataTable(ProductDataTableType::class);
Expand All @@ -77,9 +80,12 @@ In order to render the data table, create the data table view and pass it to the
```php
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Kreyu\Bundle\DataTableBundle\DataTableFactoryAwareTrait;

class ProductController extends AbstractController
{
use DataTableFactoryAwareTrait;

public function index(Request $request)
{
$dataTable = $this->createDataTable(ProductDataTableType::class);
Expand Down

0 comments on commit ed26b40

Please sign in to comment.