public function actives($slug) { $plan = Product::where('slug', $slug)->first(); $users = \DB::table('users')->join('orders', 'orders.user_id', '=', 'users.id')->join('order_items', 'order_items.order_id', '=', 'orders.id')->join('products', 'products.id', '=', 'order_items.product_id')->where('products.slug', '=', $slug)->where('users.suscriptor', '=', 1)->select('users.*')->orderBy('users.name', 'ASC')->get(); return view('admin.products.reportUser', compact('plan', 'users')); }
/** * Store a newly created resource in storage. * * @return Response */ public function plan() { $plans = Product::where('visible', '<>', 0)->paginate(3); return view('Site.Plan', compact('plans')); }