PHPackages                             jeremykenedy/laravel-logger - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. jeremykenedy/laravel-logger

ActivePackage[Logging &amp; Monitoring](/categories/logging)

jeremykenedy/laravel-logger
===========================

Laravel Logger Package

V11.1.1(4mo ago)584288.4k—6.3%1211MITPHPPHP &gt;=7.3.0|^8.0

Since Nov 8Pushed 4mo ago31 watchersCompare

[ Source](https://github.com/jeremykenedy/laravel-logger)[ Packagist](https://packagist.org/packages/jeremykenedy/laravel-logger)[ GitHub Sponsors](https://github.com/jeremykenedy)[ Patreon](https://www.patreon.com/jeremykenedy)[ RSS](/packages/jeremykenedy-laravel-logger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (60)Used By (1)

[![Laravel Logger](https://camo.githubusercontent.com/cae322ddf326ab54c0b342b1f296970ec167989a94e205a73ca7903060ee4fe3/68747470733a2f2f6769746875622d70726f6a6563742d696d616765732e73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6c61726176656c2d626c6f636b65722f6c61726176656c2d6c6f676765722d6c6f676f2e706e67)](https://camo.githubusercontent.com/cae322ddf326ab54c0b342b1f296970ec167989a94e205a73ca7903060ee4fe3/68747470733a2f2f6769746875622d70726f6a6563742d696d616765732e73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6c61726176656c2d626c6f636b65722f6c61726176656c2d6c6f676765722d6c6f676f2e706e67)

Laravel Activity Logger
=======================

[](#laravel-activity-logger)

Laravel logger is an activity event logger for your Laravel or Lumen application. It comes out the box with ready to use with dashboard to view your activity. Laravel logger can be added as a middleware or called through a trait. Easily have an Activity Log. This package is easily configurable and customizable. Supports Laravel 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 6, 7, 8 and 9+

[![Latest Stable Version](https://camo.githubusercontent.com/40c7fb441ed0c0d6e80822cce75852d0b3fd34cc9e16e2c577bec9531f77f0ec/68747470733a2f2f706f7365722e707567782e6f72672f6a6572656d796b656e6564792f6c61726176656c2d6c6f676765722f762f737461626c65)](https://packagist.org/packages/jeremykenedy/laravel-logger)[![Total Downloads](https://camo.githubusercontent.com/607a38a8bd754a5c80b5c20a5b8064058841eb4a6f28dfc737cf15c046cc34da/68747470733a2f2f706f7365722e707567782e6f72672f6a6572656d796b656e6564792f6c61726176656c2d6c6f676765722f646f776e6c6f616473)](https://packagist.org/packages/jeremykenedy/laravel-logger)[![StyleCI](https://camo.githubusercontent.com/f6cb23e850307d296bed35fa506aa5b5688cd4aaaeea03be6eb070c2cfdeb241/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130393633303732302f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/109630720)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6a07b4f6f221b86b24f9f36d7678fb5ad332e68cc840842b20fd361bf033a587/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6572656d796b656e6564792f6c61726176656c2d6c6f676765722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/jeremykenedy/laravel-logger/?branch=master)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

#### Table of contents

[](#table-of-contents)

- [Features](#features)
- [Requirements](#requirements)
- [Integrations](#integrations)
- [Laravel Installation Instructions](#laravel-installation-instructions)
- [Lumen Installation Instructions](#lumen-installation-instructions)
- [Configuration](#configuration)
    - [Environment File](#environment-file)
- [Usage](#usage)
    - [Middleware Usage](#middleware-usage)
    - [Trait Usage](#trait-usage)
- [Routes](#routes)
- [Search &amp; Filtering](#search--filtering)
- [Screenshots](#screenshots)
- [File Tree](#file-tree)
- [Opening an Issue](#opening-an-issue)
- [License](#license)

### Features

[](#features)

Laravel Activity Logger FeaturesLogs login page visitsLogs user loginsLogs user logoutsRouting Events can recording using middlewareRecords activity timestampsRecords activity descriptionRecords activity details (optional)Records model related to the activity (optional)Records activity user type with crawler detectionRecords activity MethodRecords activity RouteRecords activity Ip AddressRecords activity User AgentRecords activity Browser LanguageRecords activity referrerCustomizable activity modelActivity panel dashboardIndividual activity drilldown report dashboardActivity Drilldown looks up Id Address meta informationActivity Drilldown shows user roles if enabledActivity Drilldown shows associated user eventsActivity log can be cleared, restored, and destroyed using eloquent softdeletesCleared activity logs can be viewed and have drilldown abilityUses font awesome, cdn assets can be optionally called in configurationUses [Geoplugin API](http://www.geoplugin.com/) for drilldown IP meta informationUses Language localization filesLots of [configuration](#configuration) options**NEW: Date filtering** - Filter activities by date range or predefined periods**NEW: Export functionality** - Export activities to CSV, JSON, and Excel formats**NEW: Enhanced search** - Improved search with date filtering support**NEW: Performance optimizations** - Better handling of large datasets### Requirements

[](#requirements)

- [Laravel 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 6, and 7+](https://laravel.com/docs/installation)
- [jaybizzle/laravel-crawler-detect](https://github.com/JayBizzle/Laravel-Crawler-Detect) included dependency in composer.json (for crawler detection)

### 🎞️ Video Tour

[](#film_strip-video-tour)

If you'd prefer a more visual review of this package, please watch this video on Laravel Package Tutorial.

[![](https://camo.githubusercontent.com/ea4f59ac851386142a31f0444495bdbdadb32ba2fa3429c3bca9da95edfa8dff/68747470733a2f2f696d672e796f75747562652e636f6d2f76692f6d484c537639586854756b2f302e6a7067)](https://youtu.be/mHLSv9XhTuk)

### Integrations

[](#integrations)

Laravel logger can work out the box with or without the following roles packages:

- [jeremykenedy/laravel-roles](https://github.com/jeremykenedy/laravel-roles)
- [spatie/laravel-permission](https://github.com/spatie/laravel-permission)
- [Zizaco/entrust](https://github.com/Zizaco/entrust)
- [romanbican/roles](https://github.com/romanbican/roles)
- [ultraware/roles](https://github.com/ultraware/roles)

### Laravel Installation Instructions

[](#laravel-installation-instructions)

1. From your projects root folder in terminal run:

```
    composer require jeremykenedy/laravel-logger
```

2. Register the package

- Laravel 5.5 and up Uses package auto discovery feature, no need to edit the `config/app.php` file.
- Laravel 5.4 and below Register the package with laravel in `config/app.php` under `providers` with the following:

```
    'providers' => [
        jeremykenedy\LaravelLogger\LaravelLoggerServiceProvider::class,
    ];
```

3. Run the migration to add the table to record the activities to:

```
    php artisan migrate
```

- Note: If you want to specify a different table or connection make sure you update your `.env` file with the needed configuration variables.

4. Optionally Update your `.env` file and associated settings (see [Environment File](#environment-file) section)
5. Optionally publish the packages views, config file, assets, and language files by running the following from your projects root folder:

```
    php artisan vendor:publish --tag=LaravelLogger
```

### Lumen Installation Instructions

[](#lumen-installation-instructions)

##### This installs laravel-logger without the GUI

[](#this-installs-laravel-logger-without-the-gui)

1. From your projects root folder in terminal run:

```
    composer require jeremykenedy/laravel-logger
```

2. Register the package

Register the package with laravel in `bootstrap/app.php` with the following:

```
    $app->register(\Jaybizzle\LaravelCrawlerDetect\LaravelCrawlerDetectServiceProvider::class);
    $app->configure('laravel-logger');
    $app->register(\jeremykenedy\LaravelLogger\LaravelLoggerServiceProvider::class);
    $app->routeMiddleware(['activity' => \jeremykenedy\LaravelLogger\App\Http\Middleware\LogActivity::class, ]);
```

3. Copy the configuration file [laravel-logger.php](src/config/laravel-logger.php) to your `config/` directory

##### Set LARAVEL\_LOGGER\_DISABLE\_ROUTES=true in your .env file!

[](#set-laravel_logger_disable_routestrue-in-your-env-file)

4. Run the migration to add the table to record the activities to:

```
    php artisan migrate
```

- Note: If you want to specify a different table or connection make sure you update your `.env` file with the needed configuration variables.

5. Optionally Update your `.env` file and associated settings (see [Environment File](#environment-file) section)

### Configuration

[](#configuration)

Laravel Activity Logger can be configured in directly in `/config/laravel-logger.php` if you published the assets. Or you can variables to your `.env` file.

##### Environment File

[](#environment-file)

Here are the `.env` file variables available:

```
LARAVEL_LOGGER_DATABASE_CONNECTION=mysql
LARAVEL_LOGGER_DATABASE_TABLE=laravel_logger_activity
LARAVEL_LOGGER_ROLES_ENABLED=true
LARAVEL_LOGGER_ROLES_MIDDLWARE=role:admin
LARAVEL_LOGGER_MIDDLEWARE_ENABLED=true
LARAVEL_LOGGER_MIDDLEWARE_EXCEPT=
LARAVEL_LOGGER_ACTIVITY_MODEL=jeremykenedy\LaravelLogger\App\Models\Activity
LARAVEL_LOGGER_USER_MODEL=App\User
LARAVEL_LOGGER_USER_ID_FIELD=id
LARAVEL_LOGGER_DISABLE_ROUTES=false
LARAVEL_LOGGER_PAGINATION_ENABLED=true
LARAVEL_LOGGER_CURSOR_PAGINATION_ENABLED=false
LARAVEL_LOGGER_PAGINATION_PER_PAGE=25
LARAVEL_LOGGER_DATATABLES_ENABLED=true
LARAVEL_LOGGER_ENABLE_SEARCH=true
LARAVEL_LOGGER_SEARCH_FIELDS=description,user,method,route,ip
LARAVEL_LOGGER_ENABLE_DATE_FILTERING=true
LARAVEL_LOGGER_ENABLE_EXPORT=true
LARAVEL_LOGGER_DASHBOARD_MENU_ENABLED=true
LARAVEL_LOGGER_DASHBOARD_DRILLABLE=true
LARAVEL_LOGGER_LOG_RECORD_FAILURES_TO_FILE=true
LARAVEL_LOGGER_FLASH_MESSAGE_BLADE_ENABLED=true
LARAVEL_LOGGER_LAYOUT=layouts.app
LARAVEL_LOGGER_BOOTSTRAP_VERSION=4
LARAVEL_LOGGER_BLADE_PLACEMENT=stack                    #option: yield or stack
LARAVEL_LOGGER_BLADE_PLACEMENT_CSS=css-header           #placement name
LARAVEL_LOGGER_BLADE_PLACEMENT_JS=scripts-footer        #placement name
LARAVEL_LOGGER_JQUERY_CDN_ENABLED=true
LARAVEL_LOGGER_JQUERY_CDN_URL=https://code.jquery.com/jquery-2.2.4.min.js
LARAVEL_LOGGER_BOOTSTRAP_CSS_CDN_ENABLED=true
LARAVEL_LOGGER_BOOTSTRAP_CSS_CDN_URL=https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css
LARAVEL_LOGGER_BOOTSTRAP_JS_CDN_ENABLED=true
LARAVEL_LOGGER_BOOTSTRAP_JS_CDN_URL=https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js
LARAVEL_LOGGER_POPPER_JS_CDN_ENABLED=true
LARAVEL_LOGGER_POPPER_JS_CDN_URL=https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js
LARAVEL_LOGGER_FONT_AWESOME_CDN_ENABLED=true
LARAVEL_LOGGER_FONT_AWESOME_CDN_URL=https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css
```

### Usage

[](#usage)

##### Middleware Usage

[](#middleware-usage)

Events for laravel authentication scaffolding are listened for as providers and are enabled via middleware. You can add events to your routes and controllers via the middleware:

```
activity
```

Example to start recording page views using middlware in `web.php`:

```
Route::group(['middleware' => ['web', 'activity']], function () {
    Route::get('/', 'WelcomeController@welcome')->name('welcome');
});
```

This middlware can be enabled/disabled in the configuration settings.

##### Trait Usage

[](#trait-usage)

Events can be recorded directly by using the trait. When using the trait you can customize the event description.

To use the trait:

1. Include the call in the head of your class file:

    ```
        use jeremykenedy\LaravelLogger\App\Http\Traits\ActivityLogger;
    ```
2. Include the trait call in the opening of your class:

    ```
        use ActivityLogger;
    ```
3. You can record the activity by calling the traits method:

    ```
        ActivityLogger::activity("Logging this activity.");

    ```

    Or as bellow to include extended activity details:

    ```
        ActivityLogger::activity("Logging this activity.", "Additional activity details.");

    ```

    Or even including the model related to the activity:

    ```
        ActivityLogger::activity("Logging this activity.", "Additional activity details.", ["id" => 1, "model" => "App\Models\User"]);

    ```

### Routes

[](#routes)

##### Laravel Activity Dashbaord Routes

[](#laravel-activity-dashbaord-routes)

- `/activity` - Main activity dashboard
- `/activity/cleared` - Cleared activities dashboard
- `/activity/log/{id}` - Individual activity details
- `/activity/cleared/log/{id}` - Individual cleared activity details
- `/activity/export` - Export activities (supports CSV, JSON, Excel formats)

#### Custom package routes

[](#custom-package-routes)

If you wish to change the route paths, names or other options you can disable the default routes in your `.env` file by setting

```
LARAVEL_LOGGER_DISABLE_ROUTES=true
```

If you are on an existing install, you will also need update your `laravel-logger.php` config file to add the config option:

```
'disableRoutes' => env('LARAVEL_LOGGER_DISABLE_ROUTES', false),
```

You can then add the routes directly to your application's `routes/web.php` file, and customise as required.

```
Route::group(['prefix' => 'activity', 'namespace' => 'jeremykenedy\LaravelLogger\App\Http\Controllers', 'middleware' => ['web', 'auth', 'activity']], function () {

    // Dashboards
    Route::get('/', 'LaravelLoggerController@showAccessLog')->name('activity');
    Route::get('/cleared', ['uses' => 'LaravelLoggerController@showClearedActivityLog'])->name('cleared');

    // Drill Downs
    Route::get('/log/{id}', 'LaravelLoggerController@showAccessLogEntry');
    Route::get('/cleared/log/{id}', 'LaravelLoggerController@showClearedAccessLogEntry');

    // Export
    Route::get('/export', ['uses' => 'LaravelLoggerController@exportActivityLog'])->name('export-activity');

    // Forms
    Route::delete('/clear-activity', ['uses' => 'LaravelLoggerController@clearActivityLog'])->name('clear-activity');
    Route::delete('/destroy-activity', ['uses' => 'LaravelLoggerController@destroyActivityLog'])->name('destroy-activity');
    Route::post('/restore-log', ['uses' => 'LaravelLoggerController@restoreClearedActivityLog'])->name('restore-activity');
});
```

### Search &amp; Filtering

[](#search--filtering)

Enhanced search functionality with date filtering and export capabilities.

### High Performance Paginator

[](#high-performance-paginator)

When dealing with millions activity records, default behavior of not paginate records or [Laravel's paginator](https://laravel.com/docs/pagination#paginating-eloquent-results) (enabled `LARAVEL_LOGGER_PAGINATION_ENABLED=true`) may lead to huge performance penalties. For that use case you may set `LARAVEL_LOGGER_CURSOR_PAGINATION_ENABLED=true` to enable [Laravel's Cursor Pagination](https://laravel.com/docs/pagination#cursor-pagination) feature. This will heavily improve Laravel Logger page loading time. If you choose to do so it's advisable to read [Cursor vs. Offset Pagination](https://laravel.com/docs/pagination#cursor-vs-offset-pagination) section on Laravel's documentation to get acquainted with Cursor Pagination limitations.

##### .env file

[](#env-file)

add these configurations to your .env file to control the logging search and filtering

```
LARAVEL_LOGGER_ENABLE_SEARCH=true
LARAVEL_LOGGER_SEARCH_FIELDS=description,user,method,route,ip
LARAVEL_LOGGER_ENABLE_DATE_FILTERING=true
LARAVEL_LOGGER_ENABLE_EXPORT=true

```

##### Date Filtering

[](#date-filtering)

Filter activities by:

- Date range (from/to dates)
- Predefined periods (today, yesterday, last 7/30 days, last 3/6 months, last year)

##### Export Functionality

[](#export-functionality)

Export activities in multiple formats:

- CSV format with proper headers
- JSON format with structured data
- Excel format (.xlsx)

##### Usage Examples

[](#usage-examples)

```
# Filter by date range
/activity?date_from=2024-01-01&date_to=2024-12-31

# Filter by predefined period
/activity?period=last_7_days

# Export filtered data
/activity/export?format=csv&period=last_30_days
/activity/export?format=json&date_from=2024-01-01

```

### Screenshots

[](#screenshots)

[![dashboard](https://camo.githubusercontent.com/011f5840d857f4e1fafff35ab87bfb243e943c10127fa8dfc9a279770063a35d/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f312d64617368626f6172642e6a7067)](https://camo.githubusercontent.com/011f5840d857f4e1fafff35ab87bfb243e943c10127fa8dfc9a279770063a35d/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f312d64617368626f6172642e6a7067)[![drilldown](https://camo.githubusercontent.com/0d8cdcabbb8d2720ef63066adb3dc9608cd2f50a9796194af5bc7fe5b8c1f7d9/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f322d6472696c6c646f776e2e6a7067)](https://camo.githubusercontent.com/0d8cdcabbb8d2720ef63066adb3dc9608cd2f50a9796194af5bc7fe5b8c1f7d9/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f322d6472696c6c646f776e2e6a7067)[![confirm-clear](https://camo.githubusercontent.com/ba23049d5909a0b9c96a78aabf77b418e41e74b31766e41fa4379a0f3441cccf/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f332d636f6e6669726d2d636c6561722e6a7067)](https://camo.githubusercontent.com/ba23049d5909a0b9c96a78aabf77b418e41e74b31766e41fa4379a0f3441cccf/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f332d636f6e6669726d2d636c6561722e6a7067)[![log-cleared-msg](https://camo.githubusercontent.com/ad59c94601985325b5da847df14ddf9a873a68724df872e8717cb29a8c47ca47/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f342d6c6f672d636c65617265642d6d73672e6a7067)](https://camo.githubusercontent.com/ad59c94601985325b5da847df14ddf9a873a68724df872e8717cb29a8c47ca47/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f342d6c6f672d636c65617265642d6d73672e6a7067)[![cleared-log](https://camo.githubusercontent.com/38872b7d81836913ff073851e13aa95729240449cace8b01bf084abd583921f8/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f352d636c65617265642d6c6f672e6a7067)](https://camo.githubusercontent.com/38872b7d81836913ff073851e13aa95729240449cace8b01bf084abd583921f8/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f352d636c65617265642d6c6f672e6a7067)[![confirm-restore](https://camo.githubusercontent.com/1f6c356f8647c547a28e9d8b0461875b1d9460abbf70567d73cd352cb9a4351e/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f352d636f6e6669726d2d726573746f72652e6a7067)](https://camo.githubusercontent.com/1f6c356f8647c547a28e9d8b0461875b1d9460abbf70567d73cd352cb9a4351e/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f352d636f6e6669726d2d726573746f72652e6a7067)[![confirm-destroy](https://camo.githubusercontent.com/e6db4db1f2295263dd83d374c93f9ed6767836e1178d98d20b04eb0c266ba031/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f362d636f6e6669726d2d64657374726f792e6a7067)](https://camo.githubusercontent.com/e6db4db1f2295263dd83d374c93f9ed6767836e1178d98d20b04eb0c266ba031/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f362d636f6e6669726d2d64657374726f792e6a7067)[![success-destroy](https://camo.githubusercontent.com/dc8e16a197d5191191120bda3fd94203f9be6ca087a802b7fe022617fbaa24b9/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f372d737563636573732d64657374726f792e6a7067)](https://camo.githubusercontent.com/dc8e16a197d5191191120bda3fd94203f9be6ca087a802b7fe022617fbaa24b9/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f372d737563636573732d64657374726f792e6a7067)[![success-restored](https://camo.githubusercontent.com/25c4742582db653197590e8abce85dc9fdb3492567c2e04dcc50e76bef7b76a1/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f382d737563636573732d726573746f7265642e6a7067)](https://camo.githubusercontent.com/25c4742582db653197590e8abce85dc9fdb3492567c2e04dcc50e76bef7b76a1/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f382d737563636573732d726573746f7265642e6a7067)[![cleared-drilldown](https://camo.githubusercontent.com/b1b81552f1dc65c6439e0d869b4fd92255a4fe0b66e93275405ce8eaa1a42d32/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f392d636c65617265642d6472696c6c646f776e2e6a7067)](https://camo.githubusercontent.com/b1b81552f1dc65c6439e0d869b4fd92255a4fe0b66e93275405ce8eaa1a42d32/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f6769746875622d70726f6a6563742d696d616765732f6c61726176656c2d6c6f676765722f392d636c65617265642d6472696c6c646f776e2e6a7067)

### File Tree

[](#file-tree)

```
├── .env.travis
├── .gitignore
├── .travis.yml
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── composer.json
└── src
    ├── .env.example
    ├── LaravelLoggerServiceProvider.php
    ├── app
    │   ├── Http
    │   │   ├── Controllers
    │   │   │   └── LaravelLoggerController.php
    │   │   ├── Middleware
    │   │   │   └── LogActivity.php
    │   │   └── Traits
    │   │       ├── ActivityLogger.php
    │   │       ├── IpAddressDetails.php
    │   │       └── UserAgentDetails.php
    │   ├── Listeners
    │   │   ├── LogAuthenticated.php
    │   │   ├── LogAuthenticationAttempt.php
    │   │   ├── LogFailedLogin.php
    │   │   ├── LogLockout.php
    │   │   ├── LogPasswordReset.php
    │   │   ├── LogSuccessfulLogin.php
    │   │   └── LogSuccessfulLogout.php
    │   ├── Logic
    │   │   └── helpers.php
    │   └── Models
    │       └── Activity.php
    ├── config
    │   └── laravel-logger.php
    ├── database
    │   └── migrations
    │       └── 2017_11_04_103444_create_laravel_logger_activity_table.php
    ├── resources
    │   ├── lang
    │   │   ├── de
    │   │   │   └── laravel-logger.php
    │   │   └── en
    │   │       └── laravel-logger.php
    │   └── views
    │       ├── forms
    │       │   ├── clear-activity-log.blade.php
    │       │   ├── delete-activity-log.blade.php
    │       │   └── restore-activity-log.blade.php
    │       ├── logger
    │       │   ├── activity-log-cleared.blade.php
    │       │   ├── activity-log-item.blade.php
    │       │   ├── activity-log.blade.php
    │       │   └── partials
    │       │       └── activity-table.blade.php
    │       ├── modals
    │       │   └── confirm-modal.blade.php
    │       ├── partials
    │       │   ├── form-search.blade.php
    │       │   ├── form-status.blade.php
    │       │   ├── scripts.blade.php
    │       │   └── styles.blade.php
    │       └── scripts
    │           ├── add-title-attribute.blade.php
    │           ├── clickable-row.blade.php
    │           ├── confirm-modal.blade.php
    │           ├── datatables.blade.php
    │           └── tooltip.blade.php
    └── routes
        └── web.php
```

- Tree command can be installed using brew: `brew install tree`
- File tree generated using command `tree -a -I '.git|node_modules|vendor|storage|tests'`

### Opening an Issue

[](#opening-an-issue)

Before opening an issue there are a couple of considerations:

- You are all awesome!
- **Read the instructions** and make sure all steps were *followed correctly*.
- **Check** that the issue is not *specific to your development environment* setup.
- **Provide** *duplication steps*.
- **Attempt to look into the issue**, and if you *have a solution, make a pull request*.
- **Show that you have made an attempt** to *look into the issue*.
- **Check** to see if the issue you are *reporting is a duplicate* of a previous reported issue.
- **Following these instructions show me that you have tried.**
- If you have a questions send me an email to
- Need some help, I can do my best on Slack:
- Please be considerate that this is an open source project that I provide to the community for FREE when opening an issue.

### License

[](#license)

Laravel-logger is licensed under the MIT license. Enjoy!

###  Health Score

66

—

FairBetter than 99% of packages

Maintenance77

Regular maintenance activity

Popularity57

Moderate usage in the ecosystem

Community35

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 61.7% 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

Every ~58 days

Recently: every ~117 days

Total

52

Last Release

123d ago

Major Versions

v6.0.0 → v7.0.02023-01-05

v7.1.1 → V8.0.02023-04-06

V8.1.0 → V9.0.02024-01-22

V9.0.0 → v10.0.02024-10-03

V10.1.0 → V11.0.02025-10-21

PHP version history (3 changes)v0.0.1PHP &gt;=7.0.0

v3.8.0PHP &gt;=7.3.0

v4.2.0PHP &gt;=7.3.0|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/05cef7d9ee65723b129042943511207fb34db74a56afbf67b5900987f758c161?d=identicon)[jeremykenedy](/maintainers/jeremykenedy)

---

Top Contributors

[![jeremykenedy](https://avatars.githubusercontent.com/u/6244570?v=4)](https://github.com/jeremykenedy "jeremykenedy (169 commits)")[![azorpax](https://avatars.githubusercontent.com/u/12295737?v=4)](https://github.com/azorpax "azorpax (22 commits)")[![sudwebdesign](https://avatars.githubusercontent.com/u/1390644?v=4)](https://github.com/sudwebdesign "sudwebdesign (12 commits)")[![mohamedAbouda](https://avatars.githubusercontent.com/u/17221075?v=4)](https://github.com/mohamedAbouda "mohamedAbouda (12 commits)")[![denydias](https://avatars.githubusercontent.com/u/948202?v=4)](https://github.com/denydias "denydias (8 commits)")[![alexandre433](https://avatars.githubusercontent.com/u/10622522?v=4)](https://github.com/alexandre433 "alexandre433 (5 commits)")[![KalimeroMK](https://avatars.githubusercontent.com/u/24772657?v=4)](https://github.com/KalimeroMK "KalimeroMK (5 commits)")[![kentdahl](https://avatars.githubusercontent.com/u/2970005?v=4)](https://github.com/kentdahl "kentdahl (5 commits)")[![diatama](https://avatars.githubusercontent.com/u/20448932?v=4)](https://github.com/diatama "diatama (4 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (4 commits)")[![enkia](https://avatars.githubusercontent.com/u/255730?v=4)](https://github.com/enkia "enkia (3 commits)")[![TheNewSound](https://avatars.githubusercontent.com/u/1410503?v=4)](https://github.com/TheNewSound "TheNewSound (3 commits)")[![hittesh-ahuja-wdt](https://avatars.githubusercontent.com/u/53300489?v=4)](https://github.com/hittesh-ahuja-wdt "hittesh-ahuja-wdt (3 commits)")[![ibrahimMahfuz](https://avatars.githubusercontent.com/u/28502321?v=4)](https://github.com/ibrahimMahfuz "ibrahimMahfuz (2 commits)")[![KingComp](https://avatars.githubusercontent.com/u/6870506?v=4)](https://github.com/KingComp "KingComp (2 commits)")[![FeBe95](https://avatars.githubusercontent.com/u/7470739?v=4)](https://github.com/FeBe95 "FeBe95 (2 commits)")[![rodrigoos098](https://avatars.githubusercontent.com/u/48874286?v=4)](https://github.com/rodrigoos098 "rodrigoos098 (1 commits)")[![shailesh-ladumor](https://avatars.githubusercontent.com/u/16555999?v=4)](https://github.com/shailesh-ladumor "shailesh-ladumor (1 commits)")[![arborrow](https://avatars.githubusercontent.com/u/532371?v=4)](https://github.com/arborrow "arborrow (1 commits)")[![tcgunel](https://avatars.githubusercontent.com/u/3923425?v=4)](https://github.com/tcgunel "tcgunel (1 commits)")

---

Tags

activityactivity-dashboardactivity-drilldownactivity-logactivity-log-laravelactivity-loggeractivity-logginglaravel-loggerlaravel-loggingloggerlogger-dashboardlogginglogging-dashboardmiddlewarerequest-loggerrequest-logginglaravel loggerLaravel activityLaravel activity loggerLaravel activity logLaravel log

###  Code Quality

Static AnalysisPHPStan, Rector

### Embed Badge

![Health badge](/badges/jeremykenedy-laravel-logger/health.svg)

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

###  Alternatives

[saasscaleup/laravel-log-alarm

Laravel log Alarm help you to set up alarm when errors occur in your system and send you a notification via Slack and email

27025.0k](/packages/saasscaleup-laravel-log-alarm)[tartan/laravel-xlog

extended Laravel 5+ log

107.5k1](/packages/tartan-laravel-xlog)[php-monsters/laravel-xlog

extended Laravel 5+ log

103.3k4](/packages/php-monsters-laravel-xlog)[hryha/laravel-request-logger

A Laravel package to log requests and responses

102.2k](/packages/hryha-laravel-request-logger)

PHPackages © 2026

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