app/Http/Controllers/Category/CategorySellerController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index(Category $category)
    {
        $sellers = $category->products()
            ->with('user')
            ->get()
            ->pluck('user')
            ->unique()
            ->values();
        return $this->showAll(new UserCollection($sellers));
    }
public function index ( Category $ category ) { $ sellers = $ category -> products ( ) -> with ( 'user' ) -> get ( ) -> pluck ( 'user' ) -> unique ( ) -> values ( ) ; return $ this -> showAll ( new UserCollection ( $ sellers ) ) ; }
Display a listing of the resource.
Display a listing of the resource .