{"action":"created","issue":{"url":"https://api.github.com/repos/cviebrock/eloquent-sluggable/issues/296","repository_url":"https://api.github.com/repos/cviebrock/eloquent-sluggable","labels_url":"https://api.github.com/repos/cviebrock/eloquent-sluggable/issues/296/labels{/name}","comments_url":"https://api.github.com/repos/cviebrock/eloquent-sluggable/issues/296/comments","events_url":"https://api.github.com/repos/cviebrock/eloquent-sluggable/issues/296/events","html_url":"https://github.com/cviebrock/eloquent-sluggable/issues/296","id":167221266,"number":296,"title":"Slug don't update","user":{"login":"Sprunkas","id":3625816,"avatar_url":"https://avatars.githubusercontent.com/u/3625816?v=3","gravatar_id":"","url":"https://api.github.com/users/Sprunkas","html_url":"https://github.com/Sprunkas","followers_url":"https://api.github.com/users/Sprunkas/followers","following_url":"https://api.github.com/users/Sprunkas/following{/other_user}","gists_url":"https://api.github.com/users/Sprunkas/gists{/gist_id}","starred_url":"https://api.github.com/users/Sprunkas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sprunkas/subscriptions","organizations_url":"https://api.github.com/users/Sprunkas/orgs","repos_url":"https://api.github.com/users/Sprunkas/repos","events_url":"https://api.github.com/users/Sprunkas/events{/privacy}","received_events_url":"https://api.github.com/users/Sprunkas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-24T07:18:03Z","updated_at":"2016-07-24T14:00:51Z","closed_at":null,"body":"Hi. I have in sluggable.php file changed from 'onUpdate' => false to 'onUpdate' => true and in database table set slug to null as said in documentation like this:\r\n```\r\n        Product::where('id', $id)->update([\r\n            'slug'          => null,\r\n            'category_id'   => $request->input('category_id'),\r\n            'product'       => $request->input('product'),\r\n            'image'         => $request->input('image'),\r\n            'price'         => $request->input('price'),\r\n            'description'   => $request->input('description'),\r\n        ]);\r\n```\r\n\r\nBut slug don't update. Slug changes only when I change from `null` to `SlugService::createSlug(Product::class, 'slug', $request->input('product'))`\r\n\r\nP.S I'm using Laravel 5.2 and 4.0^ sluggable"},"comment":{"url":"https://api.github.com/repos/cviebrock/eloquent-sluggable/issues/comments/234778960","html_url":"https://github.com/cviebrock/eloquent-sluggable/issues/296#issuecomment-234778960","issue_url":"https://api.github.com/repos/cviebrock/eloquent-sluggable/issues/296","id":234778960,"user":{"login":"cviebrock","id":166810,"avatar_url":"https://avatars.githubusercontent.com/u/166810?v=3","gravatar_id":"","url":"https://api.github.com/users/cviebrock","html_url":"https://github.com/cviebrock","followers_url":"https://api.github.com/users/cviebrock/followers","following_url":"https://api.github.com/users/cviebrock/following{/other_user}","gists_url":"https://api.github.com/users/cviebrock/gists{/gist_id}","starred_url":"https://api.github.com/users/cviebrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cviebrock/subscriptions","organizations_url":"https://api.github.com/users/cviebrock/orgs","repos_url":"https://api.github.com/users/cviebrock/repos","events_url":"https://api.github.com/users/cviebrock/events{/privacy}","received_events_url":"https://api.github.com/users/cviebrock/received_events","type":"User","site_admin":false},"created_at":"2016-07-24T14:00:51Z","updated_at":"2016-07-24T14:00:51Z","body":"You might have to break that down into steps, setting the slug to null _before_ performing the update.\r\n\r\n```php\r\n$product = Product::findOrFail($id);\r\n$product->slug = null;\r\n$product->update($request->only(['category_id', 'product', 'image', 'price', 'description']));\r\n```"}}
{"actor":{"display_login":"cviebrock"}}