We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addColum()
In controller:
class IndexController extends Controller { public function index() { return Datatables::eloquent( Menu::query() ) ->addColumn('build', function ($model) { if(access()->can('admin.menu.build')) { // this function generation buttton return button_display('link', __('menu.builder'), 'fa fa-gear',[ 'href' => route('admin.menu.item.index', $model->id) ]); } }) ->addColumn('action', function($model) { $buffer = ''; if(access()->can('admin.menu.edit')) { // Same function extends `button_display` $buffer .= edit_button(route('admin.menu.edit', $model->id)); } if(access()->can('admin.menu.delete')) { $buffer .= delete_button(route('admin.menu.destroy', $model->id)); } return $buffer; }) ->make(true); } }
But i recivice JSON:
Same function but 1 column not encode, 1 column encode ?
The text was updated successfully, but these errors were encountered:
There was breaking change on v7. See upgrade guide and issue #949 for details. Thanks!
Sorry, something went wrong.
BTW, action column is allowed as raw column by default which explains why you got those output.
No branches or pull requests
In controller:
But i recivice JSON:
Same function but 1 column not encode, 1 column encode ?
The text was updated successfully, but these errors were encountered: