style: Pint 포맷팅 적용
This commit is contained in:
@@ -27,7 +27,7 @@ public function index(Request $request): View|Response
|
||||
|
||||
$categories = SalesProductCategory::active()
|
||||
->ordered()
|
||||
->with(['products' => fn($q) => $q->ordered()])
|
||||
->with(['products' => fn ($q) => $q->ordered()])
|
||||
->get();
|
||||
|
||||
$currentCategoryCode = $request->input('category', $categories->first()?->code);
|
||||
@@ -43,7 +43,7 @@ public function productList(Request $request): View
|
||||
{
|
||||
$categoryCode = $request->input('category');
|
||||
$category = SalesProductCategory::where('code', $categoryCode)
|
||||
->with(['products' => fn($q) => $q->ordered()])
|
||||
->with(['products' => fn ($q) => $q->ordered()])
|
||||
->first();
|
||||
|
||||
return view('sales.products.partials.product-list', compact('category'));
|
||||
@@ -144,7 +144,7 @@ public function destroy(int $id): JsonResponse
|
||||
public function toggleActive(int $id): JsonResponse
|
||||
{
|
||||
$product = SalesProduct::findOrFail($id);
|
||||
$product->update(['is_active' => !$product->is_active]);
|
||||
$product->update(['is_active' => ! $product->is_active]);
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
@@ -268,7 +268,7 @@ public function getProductsApi(): JsonResponse
|
||||
{
|
||||
$categories = SalesProductCategory::active()
|
||||
->ordered()
|
||||
->with(['products' => fn($q) => $q->active()->ordered()])
|
||||
->with(['products' => fn ($q) => $q->active()->ordered()])
|
||||
->get();
|
||||
|
||||
return response()->json([
|
||||
|
||||
Reference in New Issue
Block a user