Promotion Backend v1

This commit is contained in:
Kevin Adametz 2021-10-15 16:35:47 +02:00
parent 0ed47d3553
commit f0da981737
43 changed files with 2765 additions and 45 deletions

View file

@ -97,7 +97,7 @@ class LeadController extends Controller
$user->account = new UserAccount();
}
}
$next_account_id = UserAccount::max('m_account') +1;
$next_account_id = UserAccount::withTrashed()->max('m_account') +1;
if($user->account->m_account === null){
$user->account->m_account = $next_account_id;
}
@ -122,7 +122,7 @@ class LeadController extends Controller
$data = Request::all();
$show = Request::get('show');
dd($data);
if ($data['user_id'] === "new" || $data['user_id'] == 0) {
$rules = array(
'salutation' => 'required',
@ -237,7 +237,7 @@ class LeadController extends Controller
}
if(!$user->account->m_account){
$user->account->m_account = UserAccount::max('m_account') +1;
$user->account->m_account = UserAccount::withTrashed()->max('m_account') +1;
$user->account->save();
}