All Projects → spatie → Laravel Activitylog

spatie / Laravel Activitylog

Licence: mit
Log activity inside your Laravel app

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to Laravel Activitylog

Eye
Eyewitness.io package for Laravel 5 applications
Stars: ✭ 114 (-97.24%)
Mutual labels:  laravel, monitoring
Thinkgo
A lightweight MVC framework written in Go (Golang).
Stars: ✭ 184 (-95.54%)
Mutual labels:  laravel, log
Laravel Log Reader
A log reader and management tool for Laravel
Stars: ✭ 115 (-97.21%)
Mutual labels:  laravel, log
Laravel Api Health
Monitor first and third-party services and get notified when something goes wrong!
Stars: ✭ 65 (-98.42%)
Mutual labels:  laravel, monitoring
audit-log
📑 Create audit logs into the database for user behaviors, including a web UI to query logs.
Stars: ✭ 135 (-96.73%)
Mutual labels:  log, audit
Laravel Log To Db
Custom Laravel and Lumen 5.6+ Log channel handler that can store log events to SQL or MongoDB databases. Uses Laravel/Monolog native logging functionality.
Stars: ✭ 76 (-98.16%)
Mutual labels:  laravel, log
Laravel Auditing
Record the change log from models in Laravel
Stars: ✭ 2,210 (-46.4%)
Mutual labels:  laravel, audit
Laravel Uptime Monitor
A powerful and easy to configure uptime and ssl monitor
Stars: ✭ 837 (-79.7%)
Mutual labels:  laravel, monitoring
aushape
A library and a tool for converting audit logs to XML and JSON
Stars: ✭ 37 (-99.1%)
Mutual labels:  log, audit
Laravel Log Viewer
🐪 Laravel log viewer
Stars: ✭ 2,726 (-33.88%)
Mutual labels:  laravel, log
Cronmon
PHP Web app to monitor cron/scheduled tasks
Stars: ✭ 55 (-98.67%)
Mutual labels:  laravel, monitoring
Electriceye
Continuously monitor your AWS services for configurations that can lead to degradation of confidentiality, integrity or availability. All results will be sent to Security Hub for further aggregation and analysis.
Stars: ✭ 255 (-93.82%)
Mutual labels:  monitoring, audit
Laravel Heartbeat
Periodically schedule a job to send a heartbeat to a monitoring system.
Stars: ✭ 49 (-98.81%)
Mutual labels:  laravel, monitoring
Nova Tail Tool
A Laravel Nova tool to display the application log
Stars: ✭ 110 (-97.33%)
Mutual labels:  laravel, log
Laravel Log
Simple API to write logs for Laravel.
Stars: ✭ 19 (-99.54%)
Mutual labels:  laravel, log
Logviewer
📃 Provides a log viewer for Laravel
Stars: ✭ 2,098 (-49.11%)
Mutual labels:  laravel, log
Enlightn
Your performance & security consultant, an artisan command away.
Stars: ✭ 378 (-90.83%)
Mutual labels:  laravel, audit
Laravel Tail
An artisan command to tail your application logs
Stars: ✭ 587 (-85.76%)
Mutual labels:  laravel, log
Librenms
Community-based GPL-licensed network monitoring system
Stars: ✭ 2,567 (-37.74%)
Mutual labels:  laravel, monitoring
discord-audit-log-bot
A Discord bot that extends Discord's native Audit Log.
Stars: ✭ 109 (-97.36%)
Mutual labels:  log, audit

Social Card of Laravel Activity Log

Log activity inside your Laravel app

Latest Version on Packagist GitHub Workflow Status Check & fix styling Total Downloads

The spatie/laravel-activitylog package provides easy to use functions to log the activities of the users of your app. It can also automatically log model events. The Package stores all activity in the activity_log table.

Here's a demo of how you can use it:

activity()->log('Look, I logged something');

You can retrieve all activity using the Spatie\Activitylog\Models\Activity model.

Activity::all();

Here's a more advanced example:

activity()
   ->performedOn($anEloquentModel)
   ->causedBy($user)
   ->withProperties(['customProperty' => 'customValue'])
   ->log('Look, I logged something');

$lastLoggedActivity = Activity::all()->last();

$lastLoggedActivity->subject; //returns an instance of an eloquent model
$lastLoggedActivity->causer; //returns an instance of your user model
$lastLoggedActivity->getExtraProperty('customProperty'); //returns 'customValue'
$lastLoggedActivity->description; //returns 'Look, I logged something'

Here's an example on event logging.

$newsItem->name = 'updated name';
$newsItem->save();

//updating the newsItem will cause the logging of an activity
$activity = Activity::all()->last();

$activity->description; //returns 'updated'
$activity->subject; //returns the instance of NewsItem that was saved

Calling $activity->changes() will return this array:

[
   'attributes' => [
        'name' => 'updated name',
        'text' => 'Lorum',
    ],
    'old' => [
        'name' => 'original name',
        'text' => 'Lorum',
    ],
];

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Documentation

You'll find the documentation on https://docs.spatie.be/laravel-activitylog.

Find yourself stuck using the package? Found a bug? Do you have general questions or suggestions for improving the activity log? Feel free to create an issue on GitHub, we'll try to address it as soon as possible.

Installation

You can install the package via composer:

composer require spatie/laravel-activitylog

The package will automatically register itself.

You can publish the migration with:

php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="activitylog-migrations"

Note: The default migration assumes you are using integers for your model IDs. If you are using UUIDs, or some other format, adjust the format of the subject_id and causer_id fields in the published migration before continuing.

After publishing the migration you can create the activity_log table by running the migrations:

php artisan migrate

You can optionally publish the config file with:

php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="activitylog-config"

Changelog

Please see CHANGELOG for more information about recent changes.

Upgrading

Please see UPGRADING for details.

Testing

composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

And a special thanks to Caneco for the logo and Ahmed Nagi for all the work he put in v4.

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].