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
Requires
- php: >=7.0.0
- jaybizzle/laravel-crawler-detect: 1.*
- laravelcollective/html: ^5.4|^5.5|^5.6|^5.7|^5.8|^6.0
This package is auto-updated.
Last update: 2024-11-20 07:42:46 UTC
README
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
- Install Package Via Composer
composer require novay/log-module
- Migrate
php artisan module:migrate Log
- 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:
- Include the call in the head of your class file:
<?php namespace ... use ActivityLogger; class ...
- Include the trait call in the opening of your class:
... class ExampleController extends Controller { use ActivityLogger; ... }
- You can record the activity by calling the traits method:
ActivityLogger::activity("Logging this activity.");
Features
Screenshots
License
Log Activity Module is licensed under the MIT license and originaly owned by Jeremy Kenedy for both personal and commercial products. Enjoy!