public function usedList(Discount $id): View 	{ 		$discount = $id;  		$orders = Order::paid() 			->whereRaw("json_contains(discounts_applied->'$[*].discount_id', json_array(?))", [$discount->id]) 			->orWhereHas( 				'orderItems', 				function ($query) use ($discount) { 					$query->whereRaw("json_contains(discounts_applied->'$[*].discount_id', json_array(?))", [$discount->id]); 				} 			) 			->get(['final_price', 'id', 'reference_number']);  		return view('discounts.used-list', compact('discount', 'orders')); 	}