public function subscribe(Request $request)
 {
     $kuponAkanAktif = \App\Kupon::Where('kode', $request->kode)->first();
     if ($kuponAkanAktif) {
         $kuponAkanAktif->activated = true;
         $kuponAkanAktif->activated_at = \Carbon\Carbon::now();
         $kuponAkanAktif->save();
         return view('panels.user.voucher');
     } else {
         return view('panels.user.kuponsalah');
     }
 }
 public function subscribe(Request $request)
 {
     $KuponAda = \App\Kupon::Where('kode', $request->kode)->first();
     if ($KuponAda) {
         $user = \Auth::user();
         $user->subscribed = 1;
         $user->save();
         $KuponAda->delete();
         return redirect('home');
     } else {
         return 'kupon salah';
     }
 }
 public function subscribe(Request $request)
 {
     $KuponAda = \App\Kupon::Where('kode', $request->kode)->first();
     if ($KuponAda) {
         $user = \Auth::user();
         $user->subscribed = 1;
         $user->save();
         $KuponAda->delete();
         return view('panels.user.voucher');
     } else {
         return view('panels.user.kuponsalah');
     }
 }