| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <?php
- return [
- /*
- spec columns
- */
- 'columns' => [
- 'alpha' => [
- 'rows' => ['description', 'email', 'name', 'slug'],
- 'class' => 'fas fa-sort-alpha',
- ],
- 'amount' => [
- 'rows' => ['amount', 'price', 'credit'],
- 'class' => 'fas fa-sort-amount',
- ],
- 'numeric' => [
- 'rows' => ['created_at', 'updated_at', 'expired_at', 't', 'level', 'id', 'phone_number', 'port', 'times'],
- 'class' => 'fas fa-sort-numeric',
- ],
- ],
- /*
- whether icons should be enabled
- */
- 'enable_icons' => true,
- /*
- defines icon set to use when sorted data is none above (alpha nor amount nor numeric)
- */
- 'default_icon_set' => 'fas fa-sort',
- /*
- icon that shows when generating sortable link while column is not sorted
- */
- 'sortable_icon' => 'fas fa-sort',
- /*
- generated icon is clickable non-clickable (default)
- */
- 'clickable_icon' => true,
- /*
- icon and text separator (any string)
- in case of 'clickable_icon' => true; separator creates possibility to style icon and anchor-text properly
- */
- 'icon_text_separator' => ' ',
- /*
- suffix class that is appended when ascending direction is applied
- */
- 'asc_suffix' => '-up',
- /*
- suffix class that is appended when descending direction is applied
- */
- 'desc_suffix' => '-down',
- /*
- default anchor class, if value is null none is added
- */
- 'anchor_class' => null,
- /*
- default active anchor class, if value is null none is added
- */
- 'active_anchor_class' => null,
- /*
- default sort direction anchor class, if value is null none is added
- */
- 'direction_anchor_class_prefix' => null,
- /*
- relation - column separator ex: detail.phone_number means relation "detail" and column "phone_number"
- */
- 'uri_relation_column_separator' => '.',
- /*
- formatting function applied to name of column, use null to turn formatting off
- */
- 'formatting_function' => 'ucfirst',
- /*
- apply formatting function to custom titles as well as column names
- */
- 'format_custom_titles' => true,
- /*
- inject title parameter in query strings, use null to turn injection off
- example: 'inject_title' => 't' will result in ..user/?t="formatted title of sorted column"
- */
- 'inject_title_as' => null,
- /*
- allow request modification, when default sorting is set but is not in URI (first load)
- */
- 'allow_request_modification' => true,
- /*
- default direction for: $user->sortable('id') usage
- */
- 'default_direction' => 'asc',
- /*
- default direction for non-sorted columns
- */
- 'default_direction_unsorted' => 'asc',
- /*
- use the first defined sortable column (Model::$sortable) as default
- also applies if sorting parameters are invalid for example: 'sort' => 'name', 'direction' => ''
- */
- 'default_first_column' => false,
- /*
- join type: join vs leftJoin (default leftJoin)
- for more information see https://github.com/Kyslik/column-sortable/issues/59
- */
- 'join_type' => 'leftJoin',
- ];
|