Laravel 5 How to validate a unique customer name under each Activity when save
I had three model: Activity Model, Customer Model and Customeritem Model How to do the validation checking in store function whereby the customer name should be UNIQUE in each Activity? Below is each migration files Activity Model public function up() { Schema::create('activities', function (Blueprint $table) { $table->increments('id'); $table->string('activityName'); $table->string('activityCode'); $table->string('activityVenue'); $table->timestamps(); }); } Customer Model public function up() { Schema::create('customers', function (Blueprint $table) { $table->increments('id'); $table-