{"action":"created","issue":{"url":"https://api.github.com/repos/yajra/laravel-datatables/issues/251","labels_url":"https://api.github.com/repos/yajra/laravel-datatables/issues/251/labels{/name}","comments_url":"https://api.github.com/repos/yajra/laravel-datatables/issues/251/comments","events_url":"https://api.github.com/repos/yajra/laravel-datatables/issues/251/events","html_url":"https://github.com/yajra/laravel-datatables/issues/251","id":116575298,"number":251,"title":"Browser throws ajax error when addColumn is used in controller","user":{"login":"aleary06","id":11541037,"avatar_url":"https://avatars.githubusercontent.com/u/11541037?v=3","gravatar_id":"","url":"https://api.github.com/users/aleary06","html_url":"https://github.com/aleary06","followers_url":"https://api.github.com/users/aleary06/followers","following_url":"https://api.github.com/users/aleary06/following{/other_user}","gists_url":"https://api.github.com/users/aleary06/gists{/gist_id}","starred_url":"https://api.github.com/users/aleary06/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleary06/subscriptions","organizations_url":"https://api.github.com/users/aleary06/orgs","repos_url":"https://api.github.com/users/aleary06/repos","events_url":"https://api.github.com/users/aleary06/events{/privacy}","received_events_url":"https://api.github.com/users/aleary06/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-11-12T15:41:29Z","updated_at":"2015-11-13T20:48:03Z","closed_at":null,"body":"So far I'm really liking this package. Thanks for developing this! I am having one small issue. When trying to add some CRUD functions to a table via the addColumn method in my controller I get a 404 error. Removing that column allows the rest of the table data to load as expected. Here's my code:\r\n\r\nIn the controller:\r\n\r\n```php\r\npublic function show()\r\n{\r\n    $employees = Employee::select('id', 'last_name', 'first_name', 'position', 'department', 'email', 'ext', 'start_date');\r\n\r\n    return Datatables::of($employees)\r\n        ->addColumn('action', '<a href=\"{{ route(\\'employees.edit\\')}}\" data-target=\"#myModal\" role=\"button\" class=\"btn btn-success\" data-toggle=\"modal\">Edit</a>')\r\n        ->make(true);\r\n}\r\n```\r\n\r\nIn my views:\r\n\r\nmaster.blade.php:\r\n```javascript\r\n...\r\n<script>\r\n    $(document).ready(function() {\r\n        $('#employees-table').DataTable({\r\n            processing: true,\r\n            serverSide: true,\r\n            ajax: '{{ route(\"employees.show\") }}',\r\n            columns: [\r\n                { data: 'id', name: 'id' },\r\n                { data: 'first_name', name: 'first_name' },\r\n                { data: 'last_name', name: 'last_name' },\r\n                { data: 'position', name: 'position' },\r\n                { data: 'department', name: 'department' },\r\n                { data: 'email', name: 'email' },\r\n                { data: 'ext', name: 'ext'},\r\n                { data: 'start_date', name: 'start_date'},\r\n                { data: 'actions', name: 'actions'}\r\n            ]\r\n        });\r\n    });\r\n```\r\n\r\nadmin.blade.php\r\n```html\r\n@extends('layouts.master')\r\n\r\n...\r\n\r\n<table class=\"table table-striped row-bordered\" id=\"employees-table\">\r\n    <thead>\r\n      <tr>\r\n          <th>ID</th>\r\n          <th>First Name</th>\r\n          <th>Last Name</th>\r\n          <th>Position</th>\r\n          <th>Department</th>\r\n          <th>Email</th>\r\n          <th>Ext.</th>\r\n          <th>Start Date</th>\r\n          <th></th>\r\n      </tr>\r\n    </thead>\r\n    <tfoot>\r\n      <tr>\r\n          <th>ID</th>\r\n          <th>First Name</th>\r\n          <th>Last Name</th>\r\n          <th>Position</th>\r\n          <th>Department</th>\r\n          <th>Email</th>\r\n          <th>Ext.</th>\r\n          <th>Start Date</th>\r\n          <th></th>\r\n      </tr>\r\n    </tfoot>\r\n</table>\r\n```\r\n\r\nAs I mentioned above, removing the addColumn from my controller (and the corresponding code in my views), the rest of the table loads as expected, and I don't understand why adding the column causes a 404 error. Additionally, if I navigate to the json data directly (mysite.com/public/employees/show) I can see the data:\r\n\r\n![raw_json_2](https://cloud.githubusercontent.com/assets/11541037/11122314/adffa442-8928-11e5-83e7-0f01c9d78fbf.PNG)\r\n\r\nAnd in Firebug, here's the error I'm getting:\r\n\r\n![firebug_output_2](https://cloud.githubusercontent.com/assets/11541037/11122539/a706ab44-8929-11e5-96de-a3cd851387f3.PNG)\r\n\r\nDo you see what I'm doing wrong here? Thanks in advance for your help!\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/yajra/laravel-datatables/issues/comments/156552372","html_url":"https://github.com/yajra/laravel-datatables/issues/251#issuecomment-156552372","issue_url":"https://api.github.com/repos/yajra/laravel-datatables/issues/251","id":156552372,"user":{"login":"Skintillion","id":1521506,"avatar_url":"https://avatars.githubusercontent.com/u/1521506?v=3","gravatar_id":"","url":"https://api.github.com/users/Skintillion","html_url":"https://github.com/Skintillion","followers_url":"https://api.github.com/users/Skintillion/followers","following_url":"https://api.github.com/users/Skintillion/following{/other_user}","gists_url":"https://api.github.com/users/Skintillion/gists{/gist_id}","starred_url":"https://api.github.com/users/Skintillion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skintillion/subscriptions","organizations_url":"https://api.github.com/users/Skintillion/orgs","repos_url":"https://api.github.com/users/Skintillion/repos","events_url":"https://api.github.com/users/Skintillion/events{/privacy}","received_events_url":"https://api.github.com/users/Skintillion/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T20:48:03Z","updated_at":"2015-11-13T20:48:03Z","body":"I wish I could take a closer look at this, it's difficult for me without seeing everything in front of me =("}}