{"action":"created","issue":{"url":"https://api.github.com/repos/COCOPi/cockpit/issues/501","repository_url":"https://api.github.com/repos/COCOPi/cockpit","labels_url":"https://api.github.com/repos/COCOPi/cockpit/issues/501/labels{/name}","comments_url":"https://api.github.com/repos/COCOPi/cockpit/issues/501/comments","events_url":"https://api.github.com/repos/COCOPi/cockpit/issues/501/events","html_url":"https://github.com/COCOPi/cockpit/issues/501","id":197245561,"number":501,"title":"Unique slugs (next)","user":{"login":"ineentho","id":1151283,"avatar_url":"https://avatars.githubusercontent.com/u/1151283?v=3","gravatar_id":"","url":"https://api.github.com/users/ineentho","html_url":"https://github.com/ineentho","followers_url":"https://api.github.com/users/ineentho/followers","following_url":"https://api.github.com/users/ineentho/following{/other_user}","gists_url":"https://api.github.com/users/ineentho/gists{/gist_id}","starred_url":"https://api.github.com/users/ineentho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ineentho/subscriptions","organizations_url":"https://api.github.com/users/ineentho/orgs","repos_url":"https://api.github.com/users/ineentho/repos","events_url":"https://api.github.com/users/ineentho/events{/privacy}","received_events_url":"https://api.github.com/users/ineentho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-22T19:05:26Z","updated_at":"2016-12-27T10:24:27Z","closed_at":null,"body":"As far as I can see, there's no way to enforce an unique slug in cockpit next. This forces us to use URLs such as /news/58541375423d3doc1761310462/my-slug instead of a much more clean /news/my-slug.\r\n\r\nWhat are your thoughts on this? Should we create a separate slug field in addition to the existing {slug: true} option available on text fields, or should we somehow make the slug provided with text fields editable?"},"comment":{"url":"https://api.github.com/repos/COCOPi/cockpit/issues/comments/269307090","html_url":"https://github.com/COCOPi/cockpit/issues/501#issuecomment-269307090","issue_url":"https://api.github.com/repos/COCOPi/cockpit/issues/501","id":269307090,"user":{"login":"aheinze","id":321047,"avatar_url":"https://avatars.githubusercontent.com/u/321047?v=3","gravatar_id":"","url":"https://api.github.com/users/aheinze","html_url":"https://github.com/aheinze","followers_url":"https://api.github.com/users/aheinze/followers","following_url":"https://api.github.com/users/aheinze/following{/other_user}","gists_url":"https://api.github.com/users/aheinze/gists{/gist_id}","starred_url":"https://api.github.com/users/aheinze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aheinze/subscriptions","organizations_url":"https://api.github.com/users/aheinze/orgs","repos_url":"https://api.github.com/users/aheinze/repos","events_url":"https://api.github.com/users/aheinze/events{/privacy}","received_events_url":"https://api.github.com/users/aheinze/received_events","type":"User","site_admin":false},"created_at":"2016-12-27T10:24:27Z","updated_at":"2016-12-27T10:24:27Z","body":"create a file ```bootstrap.php``` in the config folder with the following code:\r\n\r\n```php\r\n<?php\r\n\r\n$app->on(\"collections.save.before.{$collectionname}\", function($name, &$entry, $isUpdate) {\r\n  // custom code to modify $entry before saving\r\n});\r\n```\r\n\r\nhope this helps."}}
{"actor":{"display_login":"aheinze"}}