I have already specified a column to be unique in my migration file. Do I need to do it again in validation rule?
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('imageName')->unique();
I have already specified a column to be unique in my migration file. Do I need to do it again in validation rule?
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('imageName')->unique();
You need to write a validation rule to get the error message, otherwise, whenever you will be adding two files with the same name it'll throw an exception ...