This commit is contained in:
Edward Yang 2022-06-27 20:34:16 +08:00
parent a54d521ba5
commit 7604c0c215
2 changed files with 4 additions and 3 deletions

View File

@ -4,8 +4,9 @@ namespace Beike\Shop\Http\Controllers;
use Beike\Models\Category;
use Illuminate\Http\Request;
use Beike\Shop\Repositories\CategoryRepo;
use Beike\Shop\Repositories\ProductRepo;
use Beike\Shop\Repositories\CategoryRepo;
use Beike\Shop\Http\Resources\ProductList;
class CategoryController extends Controller
{
@ -20,7 +21,7 @@ class CategoryController extends Controller
$data = [
'category' => $category,
'products' => $products,
'products' => ProductList::collection($products),
];
return view('category', $data);

View File

@ -5,4 +5,4 @@
<span class="price-new">$55.00</span>
<span class="price-lod">$125.00</span>
</div>
</div>
</div>