From 3af70f8f907ada534de757ca7ab724030f6753c3 Mon Sep 17 00:00:00 2001 From: Peter Deltchev Date: Fri, 11 Dec 2015 06:07:47 -0800 Subject: [PATCH] #20: Allow the reuse of deleted genre names and slugs. --- app/Commands/RenameGenreCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Commands/RenameGenreCommand.php b/app/Commands/RenameGenreCommand.php index 6882c646..afbe5d9d 100644 --- a/app/Commands/RenameGenreCommand.php +++ b/app/Commands/RenameGenreCommand.php @@ -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([