promotion 1.0
This commit is contained in:
parent
1cc8e025a1
commit
570d428b1c
60 changed files with 1596 additions and 272 deletions
|
|
@ -38,7 +38,10 @@ class PromotionController extends Controller
|
|||
if($user_promotion->user_id != Auth::user()->id){
|
||||
abort(404);
|
||||
}
|
||||
$user_promotion->about_you = !$user_promotion->about_you ? $user_promotion->user->account->about_you : $user_promotion->about_you;
|
||||
|
||||
$user_promotion->description = $user_promotion->description ? $user_promotion->description : $user_promotion->promotion_admin->user_description;
|
||||
$about_you = $user_promotion->user->account->about_you ?$user_promotion->user->account->about_you : $user_promotion->promotion_admin->user_about;
|
||||
$user_promotion->about_you = $user_promotion->about_you ? $user_promotion->about_you : $about_you;
|
||||
$data = [
|
||||
'checkPaymentCredit' => $user_promotion->checkPaymentCredit(),
|
||||
'user_promotion_cart' => PromotionUser::preCalculateCart($user_promotion, 'user_promotion'),
|
||||
|
|
@ -66,7 +69,6 @@ class PromotionController extends Controller
|
|||
return redirect(route('user_promotion_detail', [$id]))->withErrors($validator)->withInput(Request::all());
|
||||
}
|
||||
$model = $this->promoRepo->update($id, Request::all());
|
||||
|
||||
}
|
||||
\Session()->flash('alert-save', true);
|
||||
return redirect(route('user_promotion_detail', [$model->id]));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue