public function emailToRetailer($id)
 {
     $retailer = Retailer::find($id);
     $input = Input::all();
     if (Retailer::find($id)) {
         $email_id = $retailer->retailer_email;
         $message = $input['message'];
         $data = array('email' => $email_id, 'name' => 'Online Price Comparison', 'subject' => $input['subject']);
         if (Mail::send('email.sendToRetailer', ['name' => $data['name'], 'email' => $data['email']], function ($message) use($data) {
             $message->to($data['email'], $data['name'])->subject($data['subject']);
         })) {
             Session::flash('sendingmail-notification', 'Your email successfully sent');
             return \View::make('/admin/retailer/message')->with('retailer', $retailer)->with('title', 'Message');
         } else {
         }
     } else {
     }
 }
 public function show($id)
 {
     $retailer = Retailer::find($id);
     $product = \DB::table('products')->select('products.id', 'products.product_name', 'products.product_price', 'products.product_brand', 'products.product_rating', 'products.product_reviews', 'products.picture_link', 'products.shopper_link', 'products.category_id', 'retailers.picture_link as retailer_picture')->join('enrollment', 'products.id', '=', 'enrollment.product_id')->join('retailers', 'enrollment.retailer_id', '=', 'retailers.id')->where('retailers.id', '=', $retailer->id)->get();
     return \View::make('/product/baseOnRetailer')->with('products', $product)->with('title', $retailer->id . '' Products ');
 }