Skip to content

Is there an offical way to set a default column to sort by. #47

Description

@JamesAnelay

First off thanks for your effort in creating this module, it saved me a bunch of time.

Is there a better way to do the below? If I remove the if condition then my sort seems to conflict with the grid sort and the ones with a last_updated value are always at the top.

   ``` if($this->input->option('sort')->getValue() === null){
         $this->users->orderBy('last_updated','DESC');
   } ```

Where $this->users is later used in and EloquentDataprovider $provider = new EloquentDataProvider($this->users);

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions