{"action":"created","issue":{"url":"https://api.github.com/repos/sleeping-owl/admin/issues/190","labels_url":"https://api.github.com/repos/sleeping-owl/admin/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/sleeping-owl/admin/issues/190/comments","events_url":"https://api.github.com/repos/sleeping-owl/admin/issues/190/events","html_url":"https://github.com/sleeping-owl/admin/issues/190","id":98362396,"number":190,"title":"Route error?","user":{"login":"s6carlo","id":13030332,"avatar_url":"https://avatars.githubusercontent.com/u/13030332?v=3","gravatar_id":"","url":"https://api.github.com/users/s6carlo","html_url":"https://github.com/s6carlo","followers_url":"https://api.github.com/users/s6carlo/followers","following_url":"https://api.github.com/users/s6carlo/following{/other_user}","gists_url":"https://api.github.com/users/s6carlo/gists{/gist_id}","starred_url":"https://api.github.com/users/s6carlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s6carlo/subscriptions","organizations_url":"https://api.github.com/users/s6carlo/orgs","repos_url":"https://api.github.com/users/s6carlo/repos","events_url":"https://api.github.com/users/s6carlo/events{/privacy}","received_events_url":"https://api.github.com/users/s6carlo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-31T10:32:20Z","updated_at":"2015-07-31T15:15:27Z","closed_at":null,"body":"I have a table with id and product_code\r\nI want to use product_code as primary key, this is possibile:\r\n```php\r\nModel ...\r\n    protected $primaryKey = 'product_code';\r\n```\r\nThe problem is if I try to edit or delete a table row, I get this error:\r\nSorry, the page you are looking for could not be found.\r\nNotFoundHttpException in Application.php line 879:\r\n\r\nThe route \r\nhttp://localhost:8000/admin/mymodel/mytestcode/edit\r\ngives the error.\r\n\r\nI think it come from the route\r\n```php\r\nRoute::get('{adminModel}/{adminModelId}/edit', [\r\n\t\t'as'   => 'admin.model.edit',\r\n\t\t'uses' => 'AdminController@getEdit',\r\n\t]);\r\n```\r\nThe route should use the model primary key and not the adminModelId\r\n"},"comment":{"url":"https://api.github.com/repos/sleeping-owl/admin/issues/comments/126722275","html_url":"https://github.com/sleeping-owl/admin/issues/190#issuecomment-126722275","issue_url":"https://api.github.com/repos/sleeping-owl/admin/issues/190","id":126722275,"user":{"login":"s6carlo","id":13030332,"avatar_url":"https://avatars.githubusercontent.com/u/13030332?v=3","gravatar_id":"","url":"https://api.github.com/users/s6carlo","html_url":"https://github.com/s6carlo","followers_url":"https://api.github.com/users/s6carlo/followers","following_url":"https://api.github.com/users/s6carlo/following{/other_user}","gists_url":"https://api.github.com/users/s6carlo/gists{/gist_id}","starred_url":"https://api.github.com/users/s6carlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s6carlo/subscriptions","organizations_url":"https://api.github.com/users/s6carlo/orgs","repos_url":"https://api.github.com/users/s6carlo/repos","events_url":"https://api.github.com/users/s6carlo/events{/privacy}","received_events_url":"https://api.github.com/users/s6carlo/received_events","type":"User","site_admin":false},"created_at":"2015-07-31T15:15:27Z","updated_at":"2015-07-31T15:15:27Z","body":"Update: the problem is connected with string values as primary key.\r\n\r\nIf I set \r\n\r\n    protected $primaryKey = 'product_code';\r\n\r\nI can edit products that have a number as product_code but not the one with a different value, the error is\r\nObject of class SleepingOwl\\Admin\\Model\\ModelConfiguration could not be converted to string\r\n"}}