PHPackages                             fanar-app/fanar - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. fanar-app/fanar

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

fanar-app/fanar
===============

PHP and Laravel client for the Fanar debug receiver

v0.1.0(2w ago)00MITPHPPHP ^8.1

Since May 24Pushed 2w agoCompare

[ Source](https://github.com/fanar-app/fanar-php)[ Packagist](https://packagist.org/packages/fanar-app/fanar)[ RSS](/packages/fanar-app-fanar/feed)WikiDiscussions main Synced 1w ago

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

Fanar
=====

[](#fanar)

PHP and Laravel client for the [Fanar](https://github.com/fanar-app) debug receiver.

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

[](#installation)

```
composer require fanar-app/fanar
```

Laravel setup
-------------

[](#laravel-setup)

The service provider is auto-discovered. Publish the config to customise it:

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

```
FANAR_ENABLED=true
FANAR_HOST=127.0.0.1
FANAR_PORT=23517
```

Plain PHP setup
---------------

[](#plain-php-setup)

```
use Fanar\Fanar;

Fanar::configure([
    'host'    => '127.0.0.1',
    'port'    => 23517,
    'enabled' => true,
]);
```

Usage
-----

[](#usage)

### Log a scalar

[](#log-a-scalar)

```
Fanar::log('hello');
Fanar::log(42);
Fanar::log(true);
```

### Dump an array or object

[](#dump-an-array-or-object)

```
Fanar::dump($user);
Fanar::dump(['key' => 'value']);
```

### Capture an exception

[](#capture-an-exception)

```
Fanar::exception($e);
```

The origin is taken from the exception's own throw site, not the call site.

### Time a block of code

[](#time-a-block-of-code)

```
$timer = Fanar::time('my-operation');

// ... work ...

$timer->stop();
```

Calling `stop()` more than once is safe — only the first call sends.

### Labels and projects

[](#labels-and-projects)

Every method accepts an optional `$options` array:

```
Fanar::log('hello', ['label' => 'boot']);
Fanar::dump($user, ['label' => 'after-save', 'project' => 'auth']);
Fanar::exception($e, ['label' => 'payment']);
```

### Global helper

[](#global-helper)

The `fanar()` helper dispatches automatically based on type:

```
fanar('hello');   // → Fanar::log()
fanar($user);     // → Fanar::dump()
fanar($e);        // → Fanar::exception()
```

It also accepts options as a second argument:

```
fanar($user, ['label' => 'current-user']);
```

Laravel integration
-------------------

[](#laravel-integration)

### Request tracking

[](#request-tracking)

The middleware is automatically registered on the `web` and `api` groups. Each request sends its method, path, status code, duration, and query count.

### Query logging

[](#query-logging)

All queries are captured automatically via the `QueryExecuted` event — no setup needed.

### Model observer

[](#model-observer)

Add the `HasFanarLogging` trait to any Eloquent model to log `created`, `updated`, and `deleted` events, including the changed attributes on updates:

```
use Fanar\Laravel\HasFanarLogging;

class User extends Model
{
    use HasFanarLogging;
}
```

Disabling
---------

[](#disabling)

Set `FANAR_ENABLED=false` in `.env` to silence all sends without touching your code.

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

[](#requirements)

- PHP 8.1+
- Laravel 10+ (optional)

License
-------

[](#license)

MIT

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance97

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 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

16d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/073989c1f55b2aca9e218e34d66c618e0004328251f9cb37218540efdac622f6?d=identicon)[fanar-app](/maintainers/fanar-app)

---

Top Contributors

[![hihebark](https://avatars.githubusercontent.com/u/18136978?v=4)](https://github.com/hihebark "hihebark (3 commits)")

---

Tags

laraveldebugdeveloper-toolsfanar

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fanar-app-fanar/health.svg)

```
[![Health](https://phpackages.com/badges/fanar-app-fanar/health.svg)](https://phpackages.com/packages/fanar-app-fanar)
```

###  Alternatives

[barryvdh/laravel-debugbar

PHP Debugbar integration for Laravel

19.2k130.0M718](/packages/barryvdh-laravel-debugbar)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.2k1.7M54](/packages/fruitcake-laravel-debugbar)[recca0120/laravel-tracy

A Laravel Package to integrate Nette Tracy Debugger

382284.2k3](/packages/recca0120-laravel-tracy)[lsrur/inspector

Laravel Inspector, debugging and profiling tools for Web Artisans

23441.1k](/packages/lsrur-inspector)[daylerees/anbu

The Anbu profiler for Laravel 4.

3054.9k](/packages/daylerees-anbu)[php-console/laravel-service-provider

Laravel service provider to handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

7761.3k1](/packages/php-console-laravel-service-provider)

PHPackages © 2026

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