public function columns()
{
return [['name', function ($model) {
if (!Auth::user()->can('editByOwner', [ENTITY_EXPENSE_CATEGORY, $model->user_id])) {
return $model->category;
}
return link_to("expense_categories/{$model->public_id}/edit", $model->category)->toHtml();
}]];
}