PHPackages                             appcc-digital/laravel-appcc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. appcc-digital/laravel-appcc

ActiveLibrary[API Development](/categories/api)

appcc-digital/laravel-appcc
===========================

A fluent, type-safe PHP client for the APPCC Digital API

v1.0.0(3mo ago)0139MITPHPPHP ^8.2

Since Mar 10Pushed 3mo agoCompare

[ Source](https://github.com/BorahLabs/laravel-appcc)[ Packagist](https://packagist.org/packages/appcc-digital/laravel-appcc)[ RSS](/packages/appcc-digital-laravel-appcc/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (6)Versions (2)Used By (0)

Laravel APPCC
=============

[](#laravel-appcc)

A fluent, type-safe PHP client for the [APPCC Digital](https://appcc.digital) API. Record food safety logs (temperature, cleaning, reception, etc.) against an APPCC Digital tenant from any Laravel application.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11 or 12

Installation
------------

[](#installation)

```
composer require appcc-digital/laravel-appcc
```

Auto-discovery registers the service provider. Publish the config file:

```
php artisan vendor:publish --tag=appcc-config
```

Add these to your `.env`:

```
APPCC_URL=https://mi-restaurante.appcc.digital
APPCC_TOKEN=your-bearer-token
APPCC_TIMEOUT=30
```

The `APPCC_URL` is your tenant's subdomain URL — the SDK appends `/api/v1` automatically.

Verify Connection
-----------------

[](#verify-connection)

```
php artisan appcc:test-connection
```

Usage
-----

[](#usage)

All calls start from the `Appcc` facade:

```
use AppccDigital\LaravelAppcc\Facades\Appcc;
```

### Temperature Logs

[](#temperature-logs)

```
$result = Appcc::temperatureLogs()
    ->for($equipmentId)
    ->record([
        'temperature' => 3.5,
        'corrective_action' => null,
    ], photo: '/path/to/photo.jpg');

$result->successful();           // bool
$result->data()->id;             // string (ULID)
$result->data()->temperature;    // float
$result->data()->isWithinLimits; // bool
```

### Cleaning Logs

[](#cleaning-logs)

```
$result = Appcc::cleaningLogs()->record([
    'zone_id' => $zoneId,
    'type' => 'daily',              // daily|preventive|verification
    'evaluation' => 'correct',      // clean|correct|incorrect|very_dirty
    'cleaning_date' => '2026-03-10',
    'observations' => null,
    'corrective_action' => null,    // required if incorrect/very_dirty
    'items' => [],                  // required if type=verification
]);
```

### Incident Logs

[](#incident-logs)

```
$result = Appcc::incidentLogs()->record([
    'element_involved' => 'Horno industrial',
    'incident_description' => 'Fallo eléctrico en resistencia superior',
    'corrective_action' => 'Se reemplazó la resistencia',
    'incident_date' => '2026-03-10',
    'resolution_date' => '2026-03-11',
    'observations' => null,
]);
```

### Vacuum Packaging Logs

[](#vacuum-packaging-logs)

```
$result = Appcc::vacuumPackagingLogs()->record([
    'product_temp_before' => 4.0,
    'seal_integrity_ok' => true,
    'labeled_correctly' => true,
    'product_id' => $productId,
    'lot_reference' => 'LOT-2026-001',
]);
// expiry_date is auto-calculated server-side
```

### Reception Logs

[](#reception-logs)

```
$result = Appcc::receptionLogs()->record([
    'supplier_id' => $supplierId,
    'product_name' => 'Pollo fresco',
    'visual_evaluation' => 'ok',       // ok|rejected
    'temperature' => 2.5,
    'packaging_ok' => true,
    'labeling_ok' => true,
    'allergens_ok' => true,
    'rejection_reason' => null,        // required if rejected
    'corrective_action' => null,       // required if rejected
], photo: $request->file('photo'));
```

### Blast Chiller Logs

[](#blast-chiller-logs)

Multi-step process:

```
// 1. Start cycle
$result = Appcc::blastChillerLogs()->record([
    'entry_temp' => 65.0,
    'product_id' => $productId,
    'equipment_id' => $equipmentId,
]);
$logId = $result->data()->id;

// 2. Record midpoint
$result = Appcc::blastChillerLogs()->for($logId)->update([
    'mid_temp' => 30.0,
]);

// 3. Record exit
$result = Appcc::blastChillerLogs()->for($logId)->update([
    'exit_temp' => 3.0,
    'corrective_action' => null, // required if out of limits
]);
```

### Water Control Logs

[](#water-control-logs)

```
$result = Appcc::waterControlLogs()->record([
    'sample_location' => 'Cocina principal',
    'chlorine_level' => 0.5,   // OK: 0.2–1.0 mg/L
    'ph_level' => 7.2,         // OK: 6.5–9.5
    'corrective_action' => null,
]);
```

### Vegetable Disinfection Logs

[](#vegetable-disinfection-logs)

```
$result = Appcc::vegetableDisinfectionLogs()->record([
    'product_name' => 'Lechuga',
    'start_time' => '10:00',
    'end_time' => '10:15',
    'chlorine_concentration_ppm' => 100,
]);
```

### Sample Storage Logs

[](#sample-storage-logs)

```
$result = Appcc::sampleStorageLogs()->record([
    'product_name' => 'Paella',
    'quantity_grams' => 150,
    'storage_temp' => -18.0,
    'container_type' => 'Bolsa hermética',
]);
// destruction_date is auto-calculated (sample_date + 7 days)
```

Result Object
-------------

[](#result-object)

All API calls return an `AppccResult` instance:

```
$result->successful();  // bool — true for 2xx
$result->failed();      // bool — true for non-2xx
$result->status();      // int — HTTP status code
$result->data();        // Typed DTO on success, null on failure
$result->errors();      // Validation errors on 422, empty otherwise
$result->message();     // Error message from API
$result->toArray();     // Raw response array
```

No exceptions are thrown — the caller always gets an `AppccResult` and decides how to handle failures.

Queued Dispatch
---------------

[](#queued-dispatch)

Fire-and-forget any API call via Laravel's queue system:

```
// Synchronous (default)
$result = Appcc::temperatureLogs()->for($eq)->record([...]);

// Queued
Appcc::temperatureLogs()->for($eq)->record([...])->dispatch();

// Custom queue
Appcc::temperatureLogs()->for($eq)->record([...])->dispatch(queue: 'sensors');
```

Configure the default queue in `config/appcc.php` or via `APPCC_QUEUE` env var.

File Uploads
------------

[](#file-uploads)

Endpoints that accept photos (`temperature-logs`, `reception-logs`) support file uploads:

```
// File path
Appcc::temperatureLogs()->for($eq)->record($data, photo: '/tmp/photo.jpg');

// Laravel UploadedFile
Appcc::temperatureLogs()->for($eq)->record($data, photo: $request->file('photo'));

// Resource/stream
Appcc::temperatureLogs()->for($eq)->record($data, photo: fopen('/tmp/photo.jpg', 'r'));
```

The SDK automatically switches to `multipart/form-data` when a file is attached.

Testing
-------

[](#testing)

### Faking the Client

[](#faking-the-client)

```
use AppccDigital\LaravelAppcc\Facades\Appcc;

beforeEach(function () {
    Appcc::fake();
});

it('records temperature after sensor read', function () {
    // ... your application code ...

    Appcc::assertSent('temperature-logs', 1);
    Appcc::assertSentWith('temperature-logs', [
        'temperature' => 3.5,
    ]);
});
```

### Assertions

[](#assertions)

```
Appcc::assertSent('temperature-logs', 2);      // called N times
Appcc::assertSent('cleaning-logs');             // at least once
Appcc::assertSentWith('temperature-logs', [...]);
Appcc::assertNotSent('incident-logs');
Appcc::assertNothingSent();
Appcc::assertNothingSentTo('incident-logs');

$requests = Appcc::recorded();                  // all requests
$requests = Appcc::recorded('temperature-logs'); // filtered
```

### Custom Fake Responses

[](#custom-fake-responses)

```
Appcc::fake([
    'temperature-logs' => Appcc::response([
        'id' => 'fake-id',
        'temperature' => 3.5,
        'is_within_limits' => true,
    ], 201),

    'incident-logs' => Appcc::response([
        'message' => 'Validation failed',
        'errors' => ['element_involved' => ['Required']],
    ], 422),
]);
```

Endpoints Reference
-------------------

[](#endpoints-reference)

SDK MethodHTTPAPI Endpoint`temperatureLogs()->for($eq)->record()`POST`/api/v1/temperature-logs/{equipment}``cleaningLogs()->record()`POST`/api/v1/cleaning-logs``incidentLogs()->record()`POST`/api/v1/incident-logs``vacuumPackagingLogs()->record()`POST`/api/v1/vacuum-packaging-logs``receptionLogs()->record()`POST`/api/v1/reception-logs``blastChillerLogs()->record()`POST`/api/v1/blast-chiller-logs``blastChillerLogs()->for($id)->update()`PATCH`/api/v1/blast-chiller-logs/{log}``waterControlLogs()->record()`POST`/api/v1/water-control-logs``vegetableDisinfectionLogs()->record()`POST`/api/v1/vegetable-disinfection-logs``sampleStorageLogs()->record()`POST`/api/v1/sample-storage-logs`License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance79

Regular maintenance activity

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

109d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8dbfeba566942b72c1d32de4763a869cc7cb28f522dbb3ca555d48847a24c077?d=identicon)[RuliLG](/maintainers/RuliLG)

---

Top Contributors

[![RuliLG](https://avatars.githubusercontent.com/u/3358390?v=4)](https://github.com/RuliLG "RuliLG (1 commits)")

---

Tags

laravelappccfood-safetyhaccp

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/appcc-digital-laravel-appcc/health.svg)

```
[![Health](https://phpackages.com/badges/appcc-digital-laravel-appcc/health.svg)](https://phpackages.com/packages/appcc-digital-laravel-appcc)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.6k](/packages/larastan-larastan)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

76518.2M120](/packages/laravel-mcp)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
