Fixes for client registration migration
This commit is contained in:
parent
3088109e29
commit
57417a4700
1 changed files with 5 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use App\DataMapper\ClientRegistrationFields;
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
@ -18,6 +19,10 @@ return new class extends Migration
|
||||||
|
|
||||||
$crfs = $company->client_registration_fields;
|
$crfs = $company->client_registration_fields;
|
||||||
|
|
||||||
|
if(!$crfs) {
|
||||||
|
$crfs = ClientRegistrationFields::generate();
|
||||||
|
}
|
||||||
|
|
||||||
foreach($crfs as $key => $crf)
|
foreach($crfs as $key => $crf)
|
||||||
{
|
{
|
||||||
$crfs[$key]['visible'] = $crfs[$key]['required'];
|
$crfs[$key]['visible'] = $crfs[$key]['required'];
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue