{"action":"created","issue":{"url":"https://api.github.com/repos/sleeping-owl/admin/issues/56","labels_url":"https://api.github.com/repos/sleeping-owl/admin/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/sleeping-owl/admin/issues/56/comments","events_url":"https://api.github.com/repos/sleeping-owl/admin/issues/56/events","html_url":"https://github.com/sleeping-owl/admin/issues/56","id":65006520,"number":56,"title":"ordering issue","user":{"login":"eugenem","id":210991,"avatar_url":"https://avatars.githubusercontent.com/u/210991?v=3","gravatar_id":"","url":"https://api.github.com/users/eugenem","html_url":"https://github.com/eugenem","followers_url":"https://api.github.com/users/eugenem/followers","following_url":"https://api.github.com/users/eugenem/following{/other_user}","gists_url":"https://api.github.com/users/eugenem/gists{/gist_id}","starred_url":"https://api.github.com/users/eugenem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eugenem/subscriptions","organizations_url":"https://api.github.com/users/eugenem/orgs","repos_url":"https://api.github.com/users/eugenem/repos","events_url":"https://api.github.com/users/eugenem/events{/privacy}","received_events_url":"https://api.github.com/users/eugenem/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-29T00:37:48Z","updated_at":"2015-04-03T10:31:28Z","closed_at":null,"body":"There is my code and the result:\r\nhttps://www.dropbox.com/s/knl274ovm0zs1tm/Screenshot%202015-03-29%2003.35.21.png?dl=0\r\n\r\nArrows look correct (0 has only down, 3 has only up), but row order is wrong.\r\n\r\n````\r\nAdmin::model('\\App\\Models\\Category')\r\n    ->title('Categories')\r\n    ->columns(function ()\r\n    {\r\n        Column::string('ordr', 'Order')->sortableDefault();\r\n        Column::string('name', 'Name');\r\n    })\r\n    ->form(function ()\r\n    {\r\n        FormItem::text('ordr', 'Order');\r\n        FormItem::text('name', 'Name');\r\n    });\r\n\r\n\r\nclass Category extends \\SleepingOwl\\Models\\SleepingOwlModel\r\n    implements ModelWithOrderFieldInterface\r\n{\r\n    protected $guarded = ['id'];\r\n\r\n    use ModelWithOrderFieldTrait;\r\n\r\n    public function getSortField()\r\n    {\r\n        return 'ordr';\r\n    }\r\n\r\n    public function scopeDefaultSort( $query )\r\n    {\r\n        return $query->orderBy( 'ordr', 'asc' );\r\n    }\r\n}\r\n````"},"comment":{"url":"https://api.github.com/repos/sleeping-owl/admin/issues/comments/89249773","html_url":"https://github.com/sleeping-owl/admin/issues/56#issuecomment-89249773","issue_url":"https://api.github.com/repos/sleeping-owl/admin/issues/56","id":89249773,"user":{"login":"sleeping-owl","id":9197310,"avatar_url":"https://avatars.githubusercontent.com/u/9197310?v=3","gravatar_id":"","url":"https://api.github.com/users/sleeping-owl","html_url":"https://github.com/sleeping-owl","followers_url":"https://api.github.com/users/sleeping-owl/followers","following_url":"https://api.github.com/users/sleeping-owl/following{/other_user}","gists_url":"https://api.github.com/users/sleeping-owl/gists{/gist_id}","starred_url":"https://api.github.com/users/sleeping-owl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sleeping-owl/subscriptions","organizations_url":"https://api.github.com/users/sleeping-owl/orgs","repos_url":"https://api.github.com/users/sleeping-owl/repos","events_url":"https://api.github.com/users/sleeping-owl/events{/privacy}","received_events_url":"https://api.github.com/users/sleeping-owl/received_events","type":"User","site_admin":false},"created_at":"2015-04-03T10:31:28Z","updated_at":"2015-04-03T10:31:28Z","body":"I`ve tried the same code and it works fine. Try to install debug bar (https://github.com/barryvdh/laravel-debugbar) and watch the sql queries. If there is wrong 'order by' - paste the query and I`ll try to find the source of the bug."}}