SaleController.php

InfoShop · sales-management, receipt-rendering, sales-reporting, pos, rest-api

Sales retrieval and filtering controller providing REST API endpoints for POS systems to query sales records by customer, status, and date range.

// Source: https://github.com/NifrasUsanar/InfoShop | License: MIT | Copyright 2025 Nifras Usanar
// Provided via justclaw.it.com; keep this notice with the code.
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Inertia\Inertia;
use App\Models\Sale;
use App\Models\SaleItem;
use App\Models\Setting;
use App\Models\Contact;
use App\Models\User;
use App\Models\ProductStock;
use App\Models\CashLog;
use App\Models\Product;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Notification;
use App\Notifications\SaleCreated;
use App\Notifications\SaleDeleted;
use App\Services\ReceiptDataService;
use Carbon\Carbon;

class SaleController extends Controller
{
    public function getSales($fi

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key