officineweb/laracheck-client

Laracheck Client - Track exceptions and errors in your Laravel applications

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/officineweb/laracheck-client

1.0.0 2025-10-24 16:51 UTC

This package is auto-updated.

Last update: 2025-12-26 21:13:11 UTC


README

Laracheck Client

Automatic Exception Tracking for Laravel Applications

Send exceptions from your Laravel app to your Laracheck monitoring server with zero configuration.

Packagist License Laravel PHP

🚀 Installation

Install the package via Composer:

composer require officineweb/laracheck-client

⚡ Quick Setup (3 Steps)

1. Publish Configuration

php artisan vendor:publish --tag=laracheck-config

2. Add Credentials to .env

Get your API key from your Laracheck dashboard and add to .env:

LARACHECK_KEY=your-api-key-from-laracheck-dashboard
LARACHECK_URL=https://your-laracheck-server.com

3. Register Exception Tracking

In your bootstrap/app.php, add exception tracking:

use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;

return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        commands: __DIR__.'/../routes/console.php',
        health: '/up',
    )
    ->withMiddleware(function (Middleware $middleware): void {
        //
    })
    ->withExceptions(function (Exceptions $exceptions): void {
        // 👇 Add this line
        app('laracheck')->track($exceptions);
    })
    ->create();

That's it! 🎉 Your application will now automatically send exceptions to Laracheck.

📊 What Gets Tracked

The client automatically captures:

  • ✅ Exception message and stack trace
  • ✅ File path and line number
  • ✅ HTTP method and full URL
  • ✅ Environment (local, staging, production)
  • ✅ HTTP status code
  • ✅ Authenticated user information
  • ✅ Request metadata (IP, user agent)
  • ✅ Server information

Smart Tracking

  • 4xx errors (404, 403, etc.) are auto-marked as fixed with no alerts
  • 5xx errors (500, 503, etc.) trigger immediate notifications
  • Environment-aware - separates local, staging, and production exceptions

🔒 Security

  • API key authentication for all requests
  • Secure HTTPS communication
  • No sensitive data is sent (passwords, tokens, etc.)
  • Failed requests fail silently to avoid infinite loops

📝 Example Data Structure

{
  "exception": "ErrorException: Undefined variable",
  "file": "app/Http/Controllers/UserController.php",
  "line": "42",
  "class": "ErrorException",
  "code": 500,
  "method": "GET",
  "fullUrl": "https://myapp.com/users/123",
  "host": "myapp.com",
  "env": "production",
  "user": {
    "id": 1,
    "email": "user@example.com",
    "name": "John Doe"
  }
}

🌐 Laracheck Server

This client requires a Laracheck server instance. Get started:

git clone https://github.com/officineweb/laracheck.git
cd laracheck
composer install
php artisan migrate
php artisan serve

Visit the Laracheck Server Repository for complete installation instructions.

🛠️ Requirements

  • PHP 8.1 or higher
  • Laravel 9.x, 10.x, 11.x, or 12.x
  • Guzzle HTTP client (auto-installed)

🤝 Contributing

Contributions are welcome! Please submit issues and pull requests to the GitHub repository.

📄 License

The MIT License (MIT). See LICENSE for more information.

💙 Credits

Built with ❤️ by Officine Web

Keep your Laravel apps bug-free!
View Laracheck Server⭐ Star on GitHub