User Order step1

This commit is contained in:
Kevin Adametz 2020-08-07 16:02:03 +02:00
parent eb55b01b0d
commit a5db985ae8
90 changed files with 6439 additions and 421 deletions

View file

@ -2,6 +2,7 @@
namespace App\Repositories;
use App\Models\PaymentMethod;
use App\Models\UserAccount;
use App\User;
use Illuminate\Support\Facades\Hash;
@ -27,6 +28,10 @@ class UserRepository extends BaseRepository {
'email' => $data['email'],
'password' => env('APP_KEY'),
]);
$this->model->payment_methods = PaymentMethod::getDefaultAsArray();
$this->model->save();
}
else{
$this->model = $this->getById($data['user_id']);
@ -67,6 +72,7 @@ class UserRepository extends BaseRepository {
]);
$this->model->account_id = $account->id;
$this->model->payment_methods = PaymentMethod::getDefaultAsArray();
$this->model->save();