# fluent-cart/1.3.25/app/Http/Controllers/TaxController.php

FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler, version 1.3.25. 43 lines.

- Page: https://pluginprobe.com/plugins/fluent-cart/1.3.25/code/app/Http/Controllers/TaxController.php
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.3.25/raw/app/Http/Controllers/TaxController.php
- Modified: 2025-10-14T16:36:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-cart/1.3.25/code/app/Http/Controllers/TaxController.php#L10-L20`.

```php
<?php

namespace FluentCart\App\Http\Controllers;

use FluentCart\Framework\Support\Arr;
use FluentCart\App\Models\OrderTaxRate;
use FluentCart\App\Services\Filter\TaxFilter;
use FluentCart\App\Services\DateTime\DateTime;
use FluentCart\Framework\Http\Request\Request;

class TaxController extends Controller
{
    public function index(Request $request)
    {
        return $this->sendSuccess([
            'taxes' => TaxFilter::fromRequest($request)->paginate(),
        ]);
    }

    public function markAsFiled(Request $request)
    {
        $idsToMark = Arr::get($request->getSafe(['ids.*' => 'intval']), 'ids', []);

        if (empty($idsToMark)) {
            return $this->sendError([
                'message' => __('No IDs provided to mark!', 'fluent-cart'),
            ], 400);
        }

        $result = OrderTaxRate::whereIn('id', $idsToMark)
            ->whereNull('filed_at')
            ->update([
                'filed_at' => DateTime::gmtNow(),
            ]);

        if (is_wp_error($result)) {
            return $result;
        }

        return $this->sendSuccess(['message' => __('Taxes marked as filed successfully', 'fluent-cart')]);
    }
}

```
