Skip to content
Discussion options

You must be logged in to vote

Hey @soluzione-software

The attribute 'orderable' => true, is used only when you want to set Custom Order Logic for Column.

I'm also using a select column in one of my projects, and it is orderable by default. Here's the definition of it:

// Column inside setupListOperation()
CRUD::column('category_id')->type('select')->label('Category')->entity('category')->attribute('name')
->model(App\Models\VisitorCategory::class);
// Model relationship
public function category()
{
   return $this->belongsTo('App\Models\VisitorCategory', 'category_id');
}

I hope this example will help you.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@soluzione-software
Comment options

@karandatwani92
Comment options

Answer selected by karandatwani92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants