Beispiel #1
0
 public function dashboard()
 {
     $this->data['css_assets'] = Assets::load('css', ['lib-bootstrap', 'lib-bootstrap-min', 'style', 'color-schemes-core', 'font-awesome', 'font-awesome-min', 'color-schemes-turquoise', 'bootstrap-responsive', 'font-family', 'star-rating', 'star-rating-min']);
     $this->data['js_assets'] = Assets::load('js', ['jquery', 'jquery-ui', 'jquery-easing', 'bootstrap-min-lib', 'jquery-isotope', 'jquery-flexslider', 'jquery.elevatezoom', 'jquery-sharrre', 'jquery-gmap3', 'imagesloaded', 'la_boutique', 'jquery-cookie', 'star-rating', 'star-rating-min']);
     $this->data['title'] = 'SayourShop | My Profile';
     $this->data['province'] = Province::get();
     $this->data['user'] = Sentinel::getUser();
     $this->data['rekening'] = UserMeta::where('user_id', $this->data['user']->id)->where('meta_key', 'bank_account')->first();
     $this->data['address'] = UserMeta::where('user_id', $this->data['user']->id)->where('meta_key', 'address')->first();
     $this->data['wish'] = UserMeta::where('user_id', $this->data['user']->id)->where('meta_key', 'wishlist')->first();
     $this->data['wishlist'] = array();
     if (empty($this->data['wish'])) {
         $unserialize = unserialize($this->data['wish']->meta_value);
         foreach ($unserialize as $value) {
             $product = Product::where('slug', $value)->first();
             $image = unserialize($product->image);
             array_push($this->data['wishlist'], $product);
         }
     }
     $this->data['order'] = Order::where('user_id', $this->data['user']->id)->orderBy('created_at', 'desc')->get();
     return view('main_layout')->with('data', $this->data)->nest('content', 'user/dashboard', array('data' => $this->data));
 }
Beispiel #2
0
 public function checkout_order()
 {
     $this->data['css_assets'] = Assets::load('css', ['lib-bootstrap', 'style', 'font-awesome', 'color-schemes-core', 'color-schemes-turquoise', 'bootstrap-responsive', 'font-family']);
     $this->data['js_assets'] = Assets::load('js', ['jquery']);
     $this->data['provinces'] = Province::get();
     $this->data['title'] = 'Daftar Pesanan';
     return view('main_layout')->with('data', $this->data)->nest('content', 'order/checkout', array('data' => $this->data));
 }