#20: Allow the reuse of deleted genre names and slugs.

This commit is contained in:
Peter Deltchev 2015-12-11 06:07:47 -08:00
parent aeeb619d60
commit 3af70f8f90

View file

@ -54,8 +54,8 @@ class RenameGenreCommand extends CommandBase
$slug = Str::slug($this->_newName);
$rules = [
'name' => 'required|unique:genres,name,'.$this->_genre->id.'|max:50',
'slug' => 'required|unique:genres,slug,'.$this->_genre->id
'name' => 'required|unique:genres,name,'.$this->_genre->id.',id,deleted_at,NULL|max:50',
'slug' => 'required|unique:genres,slug,'.$this->_genre->id.',id,deleted_at,NULL'
];
$validator = Validator::make([