chore: refactor user model (#3564)

This commit is contained in:
Regis Freyd
2020-02-11 16:01:06 -05:00
committed by GitHub
parent 26bdb8c8bb
commit 355f3b8a23
37 changed files with 790 additions and 419 deletions
@@ -3,6 +3,7 @@
namespace App\Http\Controllers\Contacts;
use App\Helpers\DateHelper;
use App\Helpers\FormHelper;
use Illuminate\Http\Request;
use App\Helpers\GendersHelper;
use App\Models\Contact\Contact;
@@ -41,7 +42,8 @@ class RelationshipsController extends Controller
->withMonths(DateHelper::getListOfMonths())
->withBirthdate(now(DateHelper::getTimezone())->toDateString())
->withExistingContacts(ContactResource::collection($existingContacts))
->withType($request->input('type'));
->withType($request->input('type'))
->withFormNameOrder(FormHelper::getNameOrderForForms(auth()->user()));
}
/**
@@ -118,7 +120,8 @@ class RelationshipsController extends Controller
->withMonth($month)
->withAge($age)
->withGenders(GendersHelper::getGendersInput())
->withHasBirthdayReminder($hasBirthdayReminder);
->withHasBirthdayReminder($hasBirthdayReminder)
->withFormNameOrder(FormHelper::getNameOrderForForms(auth()->user()));
}
/**