You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.
return Datatable::collection(Mymodel::orderBy('type')->get())
->showColumns('id','type','order','title','about')
->searchColumns('title','about')
->orderColumns('type','order','title')
->addColumn('type',function($model)
{
return Mymodel::Typename($model->type); //show the name of type number
})->make()
I want the first ordering default be 'type', but if y show 'type' like a custom field the order (in this example), the order default is by 'id', in fact, if I debug, the getOrder() return
["id","type","order","title","about"]
How can I establish a default order ?
The text was updated successfully, but these errors were encountered:
I have at server side
return Datatable::collection(Mymodel::orderBy('type')->get())
->showColumns('id','type','order','title','about')
->searchColumns('title','about')
->orderColumns('type','order','title')
->addColumn('type',function($model)
{
return Mymodel::Typename($model->type); //show the name of type number
})->make()
I want the first ordering default be 'type', but if y show 'type' like a custom field the order (in this example), the order default is by 'id', in fact, if I debug, the getOrder() return
["id","type","order","title","about"]
How can I establish a default order ?
The text was updated successfully, but these errors were encountered: