I have 2 models:
class CreateHomesTable extends Migration {
public function up() {
Schema::create('homes', function (Blueprint $table) {
$table->string('prefix', 5);
});
}
class CreateConsumersTable extends Migration {
public function up() {
Schema::create('consumers', function (Blueprint $table) {
$table->foreignId('home_id')->constrained();
$table->string('ls', 20);
});
}
When creating new Consumer
opens a hidden modal form and I shoul select home and vould like the LS
input value of form will dynamicaly change its value to prefix
acording to the selecrted home. How do it?