Skip to content

Default total records (length) to API #1597

Open
@SergioFloresG

Description

@SergioFloresG

Feature request

Hello, we are developing an api and we are certainly interested in using your component.

We have consulted the documentation but there is no element that allows us to define in the configuration the amount of elements to obtain by default.

The application is an API, it does not have direct interaction with a site or Javascript.

'search' => [
        /*
         * Sets the amount of item to obtain by default.
         * It must be a positive integer.
         * 
         * 0: without limit
         */
        'length' => 20,
datatables()->eloquent( $query )
            ->setDefaultLength(30)
            ->make()

Regards

System details

  • Amazon Linux AMI / Windows Server 2018
  • PHP 7.0.21
  • laravel/lumen-framework 5.5
  • illuminate/database 5.5

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions