I want to establish uniqueness across three column names: id1, id2, id3. I know this has been asked before, but none of the answers are thorough enough for me to follow.
I tried creating a unique id through migrations (i.e. $table->unique(array('id1', 'id2', 'id3'));)
, but this only returns an error when directly adding to the database using sql queries (I want it to return an error when I make a post request using Postman).
To my understanding for this, I need to use Laravel's validation. I tried adding in my rules
public function rules() { return ['table_id1_id2_id3_unique' => 'unique:table,table_id1_id2_id3_unique',];}
but to no avail.