User Order step1
This commit is contained in:
parent
eb55b01b0d
commit
a5db985ae8
90 changed files with 6439 additions and 421 deletions
|
|
@ -26,9 +26,10 @@ class ProductRepository extends BaseRepository {
|
|||
{
|
||||
|
||||
$data['active'] = isset($data['active']) ? 1 : 0;
|
||||
$data['shipping_addon'] = isset($data['shipping_addon']) ? 1 : 0;
|
||||
|
||||
|
||||
if($data['id'] == "new"){
|
||||
if($data['id'] === "new"){
|
||||
$this->model = Product::create($data);
|
||||
}
|
||||
else{
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue