public function index()
 {
     $activeProducts = $this->productManager->getProductRepository()->whereSeller($this->account())->scopes('active')->findAll();
     $inactiveProducts = $this->productManager->getProductRepository()->whereSeller($this->account())->scopes('inactive')->findAll();
     $productLimit = $this->account()->getProductLimit();
     return $this->view('product::{account}.products.index', compact('activeProducts', 'inactiveProducts', 'productLimit'));
 }
 public function update(Request $request, ShippingPlan $shippingPlan)
 {
     if ($products = $request->input('products') ?: []) {
         // instead of authorizing each product against seller
         // simply filter out invalid and unauthorized products
         // only sync the valid product ids
         $products = $this->productManager->getProductRepository()->whereIn('id', $products)->whereSeller($this->account())->findAll();
     }
     $shippingPlan->products()->sync($products);
     return $this->success('update');
 }
 public function index()
 {
     $products = $this->productManager->getProductRepository()->scopes('active')->with('image', 'variants')->paginate();
     return view('product::__front.products.index', compact('products'));
 }