PHP package for Laravel to send errors to Sentinel.

0.0.33 2023-10-11 15:03 UTC

This package is auto-updated.

Last update: 2023-11-11 16:23:54 UTC


PHP Version Laravel Version

Latest Version on Packagist GitHub Tests Action Status Total Downloads License codecov

PHP package for Laravel to send errors to Sentinel.

Sentinel is an open-source error tracking tool.


You can install the package via composer:

composer require kiwilan/sentinel-laravel

You can publish the config file with:

php artisan vendor:publish --tag="sentinel-config"

This is the contents of the published config file:

return [
     * If you want to disable Sentinel, set `SENTINEL_ENABLED` to `false`.
    'enabled' => env('SENTINEL_ENABLED', true),
     * Sentinel host where your application is registered.
    'host' => env('SENTINEL_HOST', 'http://app.sentinel.test'),
     * Token is used to authenticate your application with Sentinel.
    'token' => env('SENTINEL_TOKEN'),
     * If you want to throw Sentinel errors for debug, set `SENTINEL_DEBUG` to `true`.
     * WARNING: do not use it on production.
    'debug' => env('SENTINEL_DEBUG', false),



Just execute the sentinel:install Artisan command. It will automatically install the package and configure it for you.

php artisan sentinel:install


In app/Exceptions/Handler.php


namespace App\Exceptions;

use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;

class Handler extends ExceptionHandler
   * Register the exception handling callbacks for the application.
  public function register(): void
    $this->reportable(function (Throwable $e) {

If you want to debug your installation, you can set true to throwErrors: \Kiwilan\Sentinel\Facades\Sentinel::register($e, throwErrors: true).

Do not use throwErrors in production, if Sentinel instance is not available, your application will crash.

Verify your installation

Use the sentinel:test Artisan command to verify your installation.

php artisan sentinel:test

You can verify your installation by throwing an exception from a route or controller.

For example, in routes/web.php:

Route::get('/debug-sentinel', function () {
  throw new \Exception('Sentinel error!');


cp .env.example .env
composer test


Please see CHANGELOG for more information on what has changed recently.


Please see CONTRIBUTING for details.



The MIT License (MIT). Please see License File for more information.