novay/log-module

Laravel Logger Package

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:HTML

Type:laravel-module

dev-master 2020-01-19 20:33 UTC

This package is auto-updated.

Last update: 2024-11-20 07:42:46 UTC


README

Latest Stable Version Total Downloads Travis-CI Build StyleCI License: MIT

Table of contents:

About

This module is an activity event logger for your Laravel 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 and 6+.

Requirements

Installation Instructions

  1. Install Package Via Composer
composer require novay/log-module
  1. Migrate
php artisan module:migrate Log
  1. Configuration (Next Step)

This file config can be found on Module\Config\config.php. You can enable/disable this module directly from there.

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

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:
<?php

namespace ...

use ActivityLogger;

class ...
  1. Include the trait call in the opening of your class:
...

class ExampleController extends Controller {
    use ActivityLogger;
    
    ...
}
  1. You can record the activity by calling the traits method:
    ActivityLogger::activity("Logging this activity.");

Features

Screenshots

dashboard drilldown confirm-clear log-cleared-msg cleared-log confirm-restore confirm-destroy success-destroy success-restored cleared-drilldown

License

Log Activity Module is licensed under the MIT license and originaly owned by Jeremy Kenedy for both personal and commercial products. Enjoy!

Tested & running smoothly on Laravel 6+