{"action":"created","issue":{"url":"https://api.github.com/repos/yajra/laravel-datatables-oracle/issues/26","labels_url":"https://api.github.com/repos/yajra/laravel-datatables-oracle/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/yajra/laravel-datatables-oracle/issues/26/comments","events_url":"https://api.github.com/repos/yajra/laravel-datatables-oracle/issues/26/events","html_url":"https://github.com/yajra/laravel-datatables-oracle/issues/26","id":68291884,"number":26,"title":"How to add checkmark at left side of the table?","user":{"login":"andikaamri","id":3471131,"avatar_url":"https://avatars.githubusercontent.com/u/3471131?v=3","gravatar_id":"","url":"https://api.github.com/users/andikaamri","html_url":"https://github.com/andikaamri","followers_url":"https://api.github.com/users/andikaamri/followers","following_url":"https://api.github.com/users/andikaamri/following{/other_user}","gists_url":"https://api.github.com/users/andikaamri/gists{/gist_id}","starred_url":"https://api.github.com/users/andikaamri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andikaamri/subscriptions","organizations_url":"https://api.github.com/users/andikaamri/orgs","repos_url":"https://api.github.com/users/andikaamri/repos","events_url":"https://api.github.com/users/andikaamri/events{/privacy}","received_events_url":"https://api.github.com/users/andikaamri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-14T07:32:43Z","updated_at":"2015-04-14T08:17:56Z","closed_at":null,"body":"Hello Yajra,\r\n\r\nHow can I add checkmark at left side of the table for all the table (means editing the table template)?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/yajra/laravel-datatables-oracle/issues/comments/92690658","html_url":"https://github.com/yajra/laravel-datatables-oracle/issues/26#issuecomment-92690658","issue_url":"https://api.github.com/repos/yajra/laravel-datatables-oracle/issues/26","id":92690658,"user":{"login":"yajra","id":2687997,"avatar_url":"https://avatars.githubusercontent.com/u/2687997?v=3","gravatar_id":"","url":"https://api.github.com/users/yajra","html_url":"https://github.com/yajra","followers_url":"https://api.github.com/users/yajra/followers","following_url":"https://api.github.com/users/yajra/following{/other_user}","gists_url":"https://api.github.com/users/yajra/gists{/gist_id}","starred_url":"https://api.github.com/users/yajra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yajra/subscriptions","organizations_url":"https://api.github.com/users/yajra/orgs","repos_url":"https://api.github.com/users/yajra/repos","events_url":"https://api.github.com/users/yajra/events{/privacy}","received_events_url":"https://api.github.com/users/yajra/received_events","type":"User","site_admin":false},"created_at":"2015-04-14T08:17:56Z","updated_at":"2015-04-14T08:17:56Z","body":"Hi,\r\n\r\nDo you mean a checkbox on the table? One way you can achieve this is via the js script:\r\n\r\n```php\r\n\"columns\": [\r\n\t{ \"data\": function(data){\r\n\t   return '<input type=\"checkbox\" name=\"id[]\" value=\"'+ data.id +'\" />';\r\n\t}, \"orderable\": false, \"searchable\":false, \"name\":\"id\" }\r\n]\r\n```\r\n\r\nAnother way is to add this on your server side script: just a trick via `editColumn`:\r\n```php\r\n$users = User::select(['id as checkmark', 'id', 'name'])\r\nreturn Datatables::of($users)\r\n\t->editColumn('checkmark', function($user) {\r\n\t\treturn '<input type=\"checkbox\" value='. $user->id .'>';\r\n\t})\r\n\t->make(true);\r\n```\r\n\r\nand on your view:\r\n```js\r\n'columns': [\r\n\t{ 'data': 'checkmark' 'orderable': false, 'searchable':false, 'name':'id' }\r\n]\r\n```"}}