Log activity inside your Laravel app

Overview

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.

If you've found a security issue please mail [email protected] instead of using the issue tracker.

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="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="config"

This is the contents of the published config file:

return [

    /*
     * If set to false, no activities will be saved to the database.
     */
    'enabled' => env('ACTIVITY_LOGGER_ENABLED', true),

    /*
     * When the clean-command is executed, all recording activities older than
     * the number of days specified here will be deleted.
     */
    'delete_records_older_than_days' => 365,

    /*
     * If no log name is passed to the activity() helper
     * we use this default log name.
     */
    'default_log_name' => 'default',

    /*
     * You can specify an auth driver here that gets user models.
     * If this is null we'll use the default Laravel auth driver.
     */
    'default_auth_driver' => null,

    /*
     * If set to true, the subject returns soft deleted models.
     */
    'subject_returns_soft_deleted_models' => false,

    /*
     * This model will be used to log activity.
     * It should be implements the Spatie\Activitylog\Contracts\Activity interface
     * and extend Illuminate\Database\Eloquent\Model.
     */
    'activity_model' => \Spatie\Activitylog\Models\Activity::class,

    /*
     * This is the name of the table that will be created by the migration and
     * used by the Activity model shipped with this package.
     */
    'table_name' => 'activity_log',

     /*
      * This is the database connection that will be used by the migration and
      * the Activity model shipped with this package. In case it's not set
      * Laravel database.default will be used instead.
      */
    'database_connection' => env('ACTIVITY_LOGGER_DB_CONNECTION'),
];

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

License

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

Comments
  • Does not let me migrate my table it say's PDOException::(

    Does not let me migrate my table it say's PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ''")

    These are the errors - Exception trace:

    PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ''") C:\wamp64\www\fyp\vendor\laravel\framework\src\Illuminate\Database\Connection.php:457

    PDO::prepare("create table `` (id bigint unsigned not null auto_increment primary key, log_name varchar(191) null, description text not null, subject_id bigint unsigned null, subject_type varchar(191) null, causer_id bigint unsigned null, causer_type varchar(191) null, properties text null, created_at timestamp null, updated_at timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci'") C:\wamp64\www\fyp\vendor\laravel\framework\src\Illuminate\Database\Connection.php:457

    question 
    opened by Kushal-u1462694 28
  • >PHP7.2: Declaration of Orchestra\Testbench\TestCase::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp()

    >PHP7.2: Declaration of Orchestra\Testbench\TestCase::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp()

    phpunit --coverage-text --coverage-clover=coverage.clover PHP Fatal error: Declaration of Orchestra\Testbench\TestCase::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp(): void in /home/travis/build/spatie/laravel-activitylog/vendor/orchestra/testbench-core/src/TestCase.php on line 15

    opened by Gummibeer 23
  • Delete event not Logged on 1.6 version

    Delete event not Logged on 1.6 version

    I ran the command "composer update" and "laravel-activitylog" updated to version 1.6.0 The event recording the record deletion log was not executed, the record was deleted from the Model table, but was not included in the "activity_log" table.

    opened by diogomascarenha 23
  • Log activity on laravel-permission events model_has_roles table

    Log activity on laravel-permission events model_has_roles table

    I'm extending Permission and Role models for laravel-permissions package.

    Activity log works as expected when a new Role is created, updated or deleted. Now I'm just wondering how to log any activity related to model_has_roles and role_has_permissions tables to keep track when roles are assigned to a user or permissions are attached to roles.

    Having a CRUD for system users where roles can be attached/detached adds/removes records from model_has_roles table, but no activity is being logged.

    Do I need to extend pivot tables or implement anything else in my custom Models? This is how my custom Role model looks like:

    <?php
    
    namespace App;
    
    use Spatie\Permission\Models\Role as Roles;
    
    // Activity Log
    use Spatie\Activitylog\Traits\LogsActivity;
    use Spatie\Activitylog\Contracts\Activity;
    
    class Role extends Roles
    {
        //
        use LogsActivity;
    
        protected $table    = 'roles';
        protected $fillable = ['name','title','guard_name'];
    
        // Activity Log
        protected static $logFillable = true;
        protected static $submitEmptyLogs = false;
        protected static $logOnlyDirty = true;
    }
    

    Any help will be appreciated. Thanks in advance

    Edit: BTW, my controllers are using custom models such use App\Role; Edit 2: Roles are assigned to Users using $user->roles()->sync($roles);

    enhancement help wanted hacktoberfest package-compatibility 
    opened by lucianobosco 19
  • Deep Diff checking is not working

    Deep Diff checking is not working

    When using a package like spatie's own schemaless-attributes, the extra attributes are logged as being different every touch of the model, which not only generates useless logs even when using $logOnlyDirty but just creates confusion in the activity log itself. While specifying specific json attributes is supported, that functionality isn't carried over into the dirty checks to confirm that what's going into the activity log is only specifically changed json attributes. Additionally, the reverse filtering that normally works isn't applied either (being able to set logAttributes = *, and then exclude attributes from ever being logged).

    It seems that there was quite a bit more that needed to be done to add json attribute logging that what's currently there. On top of that, in enabling that functionality or really handling any deep diffing is completely unsupported.

    enhancement help wanted revisit for next major version package-compatibility 
    opened by ragingdave 17
  • refactor and adding an Activity interface to allow use of packages like  jenssegers/laravel-mongodb

    refactor and adding an Activity interface to allow use of packages like jenssegers/laravel-mongodb

    I was interested to use this package with mongodb and the jenssegers/laravel-mongodb. To make it easier to use packages like jenssegers/laravel-mongodb, I have removed the obligation to extend your model Activity. I created an Activity interface and I modified the control in the ServiceProvider so that Activity model should implement the Activity interface and extend Illuminate\Database\Eloquent\Model. In this way, to use this package with MongoDB it is sufficient to create an activity class like the following one

    
    use Spatie\Activitylog\Contracts\Activity as ActivityContract;
    use Illuminate\Support\Collection;
    use Illuminate\Database\Eloquent\Builder;
    use Illuminate\Database\Eloquent\Relations\MorphTo;
    use Jenssegers\Mongodb\Eloquent\Model as Moloquent;
    class Activity extends Moloquent implements ActivityContract
    {
        protected $table = 'activity_log';
        protected $connection = 'mongodb'; //mongodb connection
        protected $collection = 'activity_log';
    

    I've also modified some test to verify the implementation of the Interface and the extension of Illuminate\Database\Eloquent\Model.

    I hope this could be useful for the ones who wants to use this package with mongodb instead of the other database drivers shipped with Laravel.

    Thank you.

    Best regards, Leonardo Padovani

    opened by leopado 17
  • Migration Isssue

    Migration Isssue

    I M trying to migrate activity log table but it returning error as mention below

    SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that cor responds to your MariaDB server version for the right syntax to use near 'json n ull, created_at timestamp null, updated_at timestamp null) default cha' at l ine 1 (SQL: create table activity_log (id bigint unsigned not null auto_incr ement primary key, log_name varchar(191) null, description text not null, s ubject_id bigint unsigned null, subject_type varchar(191) null, causer_id b igint unsigned null, causer_type varchar(191) null, properties json null, c reated_at timestamp null, updated_at timestamp null) default character set ut f8mb4 collate 'utf8mb4_unicode_ci')

    question 
    opened by nikulnayi 16
  • Causer and Cartalyst/Sentinel

    Causer and Cartalyst/Sentinel

    config/auth.php

    <?php
    
    return [
    
        'defaults' => [
            'guard' => 'web',
            'passwords' => 'users',
        ],
    
        'guards' => [
            'web' => [
                'driver' => 'session',
                'provider' => 'users',
            ],
    
            'api' => [
                'driver' => 'token',
                'provider' => 'users',
            ],
        ],
    
        'providers' => [
            'users' => [
                'driver' => 'eloquent',
                'model' => APP\User::class,
            ],
        ],
    
        'passwords' => [
            'users' => [
                'provider' => 'users',
                'email' => 'auth.emails.password',
                'table' => 'password_resets',
                'expire' => 60,
            ],
        ],
    
    ];
    

    config/activitylog.php

    <?php
    
    return [
        'enabled' => env('ACTIVITY_LOGGER_ENABLED', true),
        'delete_records_older_than_days' => 365,
        'default_log_name' => 'default',
        'default_auth_driver' => null,
        'subject_returns_soft_deleted_models' => false,
        'activity_model' => \Spatie\Activitylog\Models\Activity::class,
        'table_name' => 'activity_log',
    ];
    

    Database: 2018-08-09 22_37_14

    I am using Cartalyst/Sentinel for auth, with a modified version of the original Sentinel model. It seems like this package does not know how to get the user, how can I fix this?

    opened by dsbilling 15
  • timestamps are converted to utc on logging

    timestamps are converted to utc on logging

    Describe the bug for example i have a from & to date columns with values of |from|to| |-----|---| |2021-02-23 00:00:00|2021-02-27 00:00:00|

    but when logged they become |from|to| |-----|---| |2021-02-22T22:00:00.000000Z | 2021-02-27T22:00:00.000000Z|

    note the -2 hrs diff.

    To Reproduce

    • set config.app.timezone to something else ex.EET
    • create a record
    • check the saved log

    Expected behavior data should be logged as it is without any changes.

    Versions (please complete the following information)

    • PHP: PHP 8.0.2 (cli)
    • Database: 8.0.23
    • Laravel: 8.28.1
    • Package: 3.16.1
    enhancement 
    opened by ctf0 14
  • How to use activitylog with spatie/permissons?

    How to use activitylog with spatie/permissons?

    Hello together,

    I would like to log the activities for the permissions. For this I created new Models of roles and permission. But I don't see any log in the database:

    <?php
    
    namespace App\Models;
    
    use Illuminate\Database\Eloquent\Model;
    use Spatie\Permission\Models\Permission as SpatiePermission;
    use Spatie\Activitylog\Traits\LogsActivity;
    use Illuminate\Database\Eloquent\SoftDeletes;
    
    class Permission extends SpatiePermission
    {
        use LogsActivity;
    	/** The following change of attributes will be logged. */
    	//protected static $logAttributes = ['name', 'text'];
    	
    	/** Alternativly we can define that following attribute changes should be not recoreded */
    	//protected static $ignoreChangedAttributes = ['text'];
    	
    	/** Only the `deleted` event will get logged automatically */
        //protected static $recordEvents = ['deleted'];
    	protected static $logOnlyDirty = true;
    
    	//use SoftDeletes; // ad in schema $table->softDeletes();
    }
    

    config/permissions.php

    <?php
    
    return [
    
        'models' => [
    
            /*
             * When using the "HasRoles" trait from this package, we need to know which
             * Eloquent model should be used to retrieve your permissions. Of course, it
             * is often just the "Permission" model but you may use whatever you like.
             *
             * The model you want to use as a Permission model needs to implement the
             * `Spatie\Permission\Contracts\Permission` contract.
             */
    
            // 'permission' => Spatie\Permission\Models\Permission::class,
    		'permission' => \App\Models\Permission::class,
    
            /*
             * When using the "HasRoles" trait from this package, we need to know which
             * Eloquent model should be used to retrieve your roles. Of course, it
             * is often just the "Role" model but you may use whatever you like.
             *
             * The model you want to use as a Role model needs to implement the
             * `Spatie\Permission\Contracts\Role` contract.
             */
    
            //'role' => Spatie\Permission\Models\Role::class,
    		'role' => \App\Models\Role::class,
    
        ],
    
    

    Did I missed anything?

    Thank you.

    opened by Nowi5 14
  • Log only dirty fields

    Log only dirty fields

    Really nice package! Is there a way to log only dirty fields? Currently I have to do a small hack like so:

    protected static $logAttributes = [];     
    
    public static function boot()
    {
        parent::boot();
        static::saving(function (Model $model) {
            static::$logAttributes = array_keys($model->getDirty());
        });
    }
    

    Would be nice to have something baked in.

    opened by aydot 14
  • Cannot load activity log when deploy it on cpanel (Could not check compatibility between Spatie\Activitylog\Models\Activity::getExtraProperty)

    Cannot load activity log when deploy it on cpanel (Could not check compatibility between Spatie\Activitylog\Models\Activity::getExtraProperty)

    Describe the bug I have a to deploy my project into cpanel. But when i deploy it, there is an error to load activity log in the browser.

    To Reproduce

    Expected behavior It should load the activity log in browser

    Screenshots image

    Versions (please complete the following information)

    • PHP: 8.1
    • Database: MySQL (PhpMyAdmin)
    • Laravel: 8.75
    • Package: 4.6

    Exception Symfony\Component\ErrorHandler\Error
    FatalError

    Could not check compatibility between Spatie\Activitylog\Models\Activity::getExtraProperty(string $propertyName, ?Spatie\Activitylog\Models\mixed $defaultValue = NULL): Spatie\Activitylog\Models\mixed and Spatie\Activitylog\Contracts\Activity::getExtraProperty(string $propertyName, Spatie\Activitylog\Contracts\mixed $defaultValue): Spatie\Activitylog\Contracts\mixed, because class Spatie\Activitylog\Models\mixed is not available

    Stack Trace Could not check compatibility between Spatie\Activitylog\Models\Activity::getExtraProperty(string $propertyName, ?Spatie\Activitylog\Models\mixed $defaultValue = NULL): Spatie\Activitylog\Models\mixed and Spatie\Activitylog\Contracts\Activity::getExtraProperty(string $propertyName, Spatie\Activitylog\Contracts\mixed $defaultValue): Spatie\Activitylog\Contracts\mixed, because class Spatie\Activitylog\Models\mixed is not available

    in /home/lppmitenasac/simpenmas2.itenas.ac.id/vendor/spatie/laravel-activitylog/src/Models/Activity.php(line 74)

    bug 
    opened by mmuqiitf 0
  • Bump actions/stale from 6.0.1 to 7.0.0

    Bump actions/stale from 6.0.1 to 7.0.0

    Bumps actions/stale from 6.0.1 to 7.0.0.

    Release notes

    Sourced from actions/stale's releases.

    v7.0.0

    ⚠️ This version contains breaking changes ⚠️

    What's Changed

    Breaking Changes

    • In this release we prevent this action from managing the stale label on items included in exempt-issue-labels and exempt-pr-labels
    • We decided that this is outside of the scope of this action, and to be left up to the maintainer

    New Contributors

    Full Changelog: https://github.com/actions/stale/compare/v6...v7.0.0

    Changelog

    Sourced from actions/stale's changelog.

    [7.0.0]

    :warning: Breaking change :warning:

    Commits
    • 6f05e42 draft release for v7.0.0 (#888)
    • eed91cb Update how stale handles exempt items (#874)
    • 10dc265 Merge pull request #880 from akv-platform/update-stale-repo
    • 9c1eb3f Update .md files and allign build-test.yml with the current test.yml
    • bc357bd Update .github/workflows/release-new-action-version.yml
    • 690ede5 Update .github/ISSUE_TEMPLATE/bug_report.md
    • afbcabf Merge branch 'main' into update-stale-repo
    • e364411 Update name of codeql.yml file
    • 627cef3 fix print outputs step (#859)
    • 975308f Merge pull request #876 from jongwooo/chore/use-cache-in-check-dist
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 0
  • Index

    Index "PRIMARY" marked as corrupted

    Describe the bug I ran into a problem earlier today so basically the index PRIMARY for table activity_log is corrupted. I do have almost 20k rows in the table. I tried to do OPTIMIZE TABLE but that was not successful.

    To Reproduce I don't actually know how to re-produce that. I have an application up and running for almost 3 years and the table has 20k rows.

    Expected behavior The index should NOT be corrupted.

    Screenshots image

    Versions (please complete the following information)

    • PHP: 7.2.17
    • Database: MariaDB 10.0.38
    • Laravel: 5.8.7
    • Package: 3.2
    bug 
    opened by crayon1337 0
  • SQLSTATE[01000]: Warning: 1265 Data truncated for column 'subject_id'

    SQLSTATE[01000]: Warning: 1265 Data truncated for column 'subject_id'

    Describe the bug SQLSTATE[01000]: Warning: 1265 Data truncated for column 'subject_id' at row 1,

    To Reproduce Things needed to reproduce the error. seed

    $project = Project::create([
                'title' => 'Project 1',
                'description' => 'Project 1 description',
                'budget' => 10,
                'release_date' => now()->addDays(10),
                'status' => ProjectStatusEnum::pending->value,
                'payment_status' => ProjectPaymentStatusEnum::pending->value,
                'freelancer_id' => 1,
                'customer_id' => 2,
            ]);
    
            $project->targets()->create([
                'title' => 'Target 1',
                'details' => 'Target 1 details',
                'user_id' => 2,
                'duedate' => now()->addDays(5),
                'budget' => 5,
                'status' => ProjectTargetStatusEnum::pending->value,
                'payment_status' => ProjectTargetPaymentStatusEnum::pending->value,
            ]);
    
            $project->targets()->create([
                'title' => 'Target 2',
                'details' => 'Target 2 details',
                'user_id' => 2,
                'duedate' => now()->addDays(9),
                'budget' => 5,
                'status' => ProjectTargetStatusEnum::pending->value,
                'payment_status' => ProjectTargetPaymentStatusEnum::pending->value,
            ]);
    

    Model: normal

    Expected behavior seed this data

    Screenshots

    Versions (please complete the following information)

    • PHP: 8.1.2
    • Database: 10.4.22-MariaDB
    • Laravel: 9.38.0
    • Package: 4.7.2

    Additional context I need to seed this data and i Log Activity in Project and ProjectTarget model

    Exception

      Illuminate\Database\QueryException 
    
      SQLSTATE[01000]: Warning: 1265 Data truncated for column 'subject_id'
    

    Stack Trace

    \vendor\laravel\framework\src\Illuminate\Database\Connection.php:760
        756▕         // If an exception occurs when attempting to run a query, we'll format the error
        757▕         // message to include the bindings with SQL, which will make this exception a
        758▕         // lot more helpful to the developer instead of just the database's errors.
        759▕         catch (Exception $e) {
      ➜ 760▕             throw new QueryException(
        761▕                 $query, $this->prepareBindings($bindings), $e
        763▕         }
        764▕     }
    
    
    bug 
    opened by salahhusa9 0
  • Bump stefanzweifel/git-auto-commit-action from 4.15.4 to 4.16.0

    Bump stefanzweifel/git-auto-commit-action from 4.15.4 to 4.16.0

    Bumps stefanzweifel/git-auto-commit-action from 4.15.4 to 4.16.0.

    Release notes

    Sourced from stefanzweifel/git-auto-commit-action's releases.

    v4.16.0

    Changed

    Fixed

    Changelog

    Sourced from stefanzweifel/git-auto-commit-action's changelog.

    v4.16.0 - 2022-12-02

    Changed

    Fixed

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    stale dependencies github_actions 
    opened by dependabot[bot] 0
Releases(4.7.2)
  • 4.7.2(Nov 14, 2022)

    What's Changed

    • Bump actions/checkout from 2 to 3 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1117
    • Bump actions/stale from 2.0.0 to 6.0.1 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1118
    • Bump stefanzweifel/git-auto-commit-action from 4.0.0 to 4.15.4 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1119
    • Add missing properties to Activity model by @AndreasHerss in https://github.com/spatie/laravel-activitylog/pull/1101
    • Bump actions/cache from 2 to 3 by @dependabot in https://github.com/spatie/laravel-activitylog/pull/1120
    • Fix enum casting by @Gummibeer in https://github.com/spatie/laravel-activitylog/pull/1121

    New Contributors

    • @dependabot made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1117
    • @AndreasHerss made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1101

    Full Changelog: https://github.com/spatie/laravel-activitylog/compare/4.7.1...4.7.2

    Source code(tar.gz)
    Source code(zip)
  • 4.7.1(Nov 11, 2022)

    What's Changed

    • Fix nullable custom properties in PHP 8.0 by @stevebauman in https://github.com/spatie/laravel-activitylog/pull/1115

    Full Changelog: https://github.com/spatie/laravel-activitylog/compare/4.7.0...4.7.1

    Source code(tar.gz)
    Source code(zip)
  • 4.7.0(Nov 10, 2022)

    What's Changed

    • Fix indentation by @mouadziani in https://github.com/spatie/laravel-activitylog/pull/1092
    • Support non backed enum & php 8.1 by @pemudakoding in https://github.com/spatie/laravel-activitylog/pull/1110

    New Contributors

    • @mouadziani made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1092
    • @pemudakoding made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1110

    Full Changelog: https://github.com/spatie/laravel-activitylog/compare/4.6.0...4.7.0

    Source code(tar.gz)
    Source code(zip)
  • 4.6.0(Sep 22, 2022)

    What's Changed

    • Add a default value to getExtraProperty() by @grantholle in https://github.com/spatie/laravel-activitylog/pull/1090

    New Contributors

    • @grantholle made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1090

    Full Changelog: https://github.com/spatie/laravel-activitylog/compare/4.5.3...4.6.0

    Source code(tar.gz)
    Source code(zip)
  • 4.5.3(May 31, 2022)

    What's Changed

    • Fixes causer not being set on ActivityLog when using a different guard other than Laravel's default by @Gnative in https://github.com/spatie/laravel-activitylog/pull/1053

    New Contributors

    • @Gnative made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1053

    Full Changelog: https://github.com/spatie/laravel-activitylog/compare/4.5.2...4.5.3

    Source code(tar.gz)
    Source code(zip)
  • 4.5.2(Apr 21, 2022)

    What's Changed

    • little typo on the logging-model-events.md page by @michaelbonner in https://github.com/spatie/laravel-activitylog/pull/1035
    • Use data_get() for placeholder replacement instead of Arr::get() by @stevebauman in https://github.com/spatie/laravel-activitylog/pull/1038

    New Contributors

    • @michaelbonner made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1035

    Full Changelog: https://github.com/spatie/laravel-activitylog/compare/4.5.1...4.5.2

    Source code(tar.gz)
    Source code(zip)
  • 4.5.1(Apr 7, 2022)

  • 4.5.0(Apr 7, 2022)

    What's Changed

    • Add Conditionable trait to ActivityLogger by @usernotnull in https://github.com/spatie/laravel-activitylog/pull/997

    New Contributors

    • @usernotnull made their first contribution in https://github.com/spatie/laravel-activitylog/pull/997

    Full Changelog: https://github.com/spatie/laravel-activitylog/compare/4.4.3...4.5.0

    Source code(tar.gz)
    Source code(zip)
  • 4.4.3(Apr 7, 2022)

    What's Changed

    • Fix model serialization when using LogsActivity with setDescriptionForEvent() by @stevebauman in https://github.com/spatie/laravel-activitylog/pull/977
    • Fix activirt logging on model restore (#895) by @kryptamine in https://github.com/spatie/laravel-activitylog/pull/1000
    • Fix nullable log names by @stevebauman in https://github.com/spatie/laravel-activitylog/pull/1029
    • Fix tapActivity when manually creating activity logs by @FrancisMawn in https://github.com/spatie/laravel-activitylog/pull/1031

    New Contributors

    • @stevebauman made their first contribution in https://github.com/spatie/laravel-activitylog/pull/977
    • @kryptamine made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1000
    • @FrancisMawn made their first contribution in https://github.com/spatie/laravel-activitylog/pull/1031

    Full Changelog: https://github.com/spatie/laravel-activitylog/compare/4.4.2...4.4.3

    Source code(tar.gz)
    Source code(zip)
  • 4.4.1(Mar 4, 2022)

  • 4.4.0(Jan 12, 2022)

  • 4.3.1(Oct 20, 2021)

  • 4.3.0(Oct 20, 2021)

  • 4.2.0(Oct 6, 2021)

  • 4.1.1(Jul 23, 2021)

  • 4.1.0(Jul 23, 2021)

  • 4.0.0(May 4, 2021)

    PR: #787
    Special thanks to Ahmed Nagi.

    • Drop Laravel 6 and 7 support.
    • Drop PHP 7.x support.
    • Add LogOptions configuration object to replace all configuration properties.
    • Add ability to batch activity logs #560
    • Add Pipeline to customize logged changes data.
      • Deep diff array/JSON sub-keys and respect for only-dirty, no-empty ... #692 using new pipeline. See implementation in the tests.
    • Implement a CauserResolver to define causer for current runtime #582.
    Source code(tar.gz)
    Source code(zip)
  • 3.17.0(Mar 2, 2021)

  • 3.16.1(Nov 3, 2020)

  • 3.16.0(Sep 16, 2020)

  • 3.15.0(Sep 14, 2020)

  • 3.14.3(Sep 9, 2020)

  • 3.14.2(May 19, 2020)

  • 4.0.0-rc.2(Mar 23, 2020)

  • 4.0.0-rc.1(Mar 23, 2020)

  • 3.14.1(Mar 23, 2020)

  • 3.14.0(Mar 23, 2020)

    Please use v3.14.1 instead - this release is breaking because of the new column. There is also a v4.0.0-rc.1 release that equals to this one.

    • add \Spatie\Activitylog\ActivityLogger::event() method and column #702
    Source code(tar.gz)
    Source code(zip)
  • 3.13.0(Mar 13, 2020)

  • 3.12.0(Mar 13, 2020)

Owner
Spatie
Webdesign agency based in Antwerp, Belgium
Spatie
Filament-spatie-laravel-activitylog - View your activity logs inside of Filament. ⚡️

View your activity logs inside of Filament. This package provides a Filament resource that shows you all of the activity logs created using the spatie

Ryan Chandler 45 Dec 26, 2022
This Package helps you in laravel application to log all desired activity for each request from request entry point to generate response at a single snapshot.

Laravel Scenario Logger This Package helps you in laravel application to log all desired activity for each request from request entry point to generat

Mehrdad Mahdian 6 Sep 27, 2021
Laravel Authentication Log is a package Log user authentication details and send new device notifications.

Laravel Authentication Log is a package which tracks your user's authentication information such as login/logout time, IP, Browser, Location, etc. as well as sends out notifications via mail, slack, or sms for new devices and failed logins.

Anthony Rappa 540 Jan 5, 2023
A REST client inside your Laravel app

Laravel Compass is an elegant REST assistant for the Laravel framework that you can use to test API calls and create API documentation. it provides automatically endpoints for GET, POST, PUT/PATCH, DELETE, various auth mechanisms, and other utility endpoints based on Laravel routes in your project.

David H. Sianturi 1.2k Dec 31, 2022
OPcodes's Log Viewer is a perfect companion for your Laravel app

Log Viewer Easy-to-use, fast, and beautiful Features | Installation | Configuration | Authorization | Troubleshooting | Credits OPcodes's Log Viewer i

null 2.2k Jan 3, 2023
Configurable activity logger for filament.

Activity logger for filament Configurable activity logger for filament. Powered by spatie/laravel-activitylog Features You can choose what you want to

Ziyaan 58 Dec 30, 2022
A package that uses blade templates to control how markdown is converted to HTML inside Laravel, as well as providing support for markdown files to Laravel views.

Install Install via composer. $ composer require olliecodes/laravel-etched-blade Once installed you'll want to publish the config. $ php artisan vendo

Ollie Codes 19 Jul 5, 2021
A simple Laravel service provider for easily using HTMLPurifier inside Laravel

HTMLPurifier for Laravel 5/6/7/8 A simple Laravel service provider for easily using HTMLPurifier inside Laravel. From their website: HTML Purifier is

MeWebStudio - Muharrem ERİN 1.7k Jan 6, 2023
Laravel Logable is a simple way to log http request in your Laravel application.

Laravel Logable is a simple way to log http request in your Laravel application. Requirements php >= 7.4 Laravel version >= 6.0 Installation composer

Sagar 6 Aug 25, 2022
Declare routes inside Laravel Livewire components.

Convoy This package allows you to declare routes inside of your full page Laravel Livewire components. All you have to do is create a route method ins

null 17 Jul 27, 2022
Declare database migrations and factory definitions inside Laravel models.

Lucid This package allows you to declare database migrations and factory definitions inside of your Laravel models. Running the lucid:migrate command

null 23 Jul 9, 2022
This package provides a Logs page that allows you to view your Laravel log files in a simple UI

A simplistics log viewer for your Filament apps. This package provides a Logs page that allows you to view your Laravel log files in a simple UI. Inst

Ryan Chandler 9 Sep 17, 2022
Laravel telegram log is a package that can catch your logs all quite simply

Laravel Telegram log Laravel telegram log is a package that can catch your logs all quite simply. Requirments This package is tested with Laravel v8 i

Muath Alsowadi 4 Aug 3, 2022
Bootstrap Theme Generator inside of a Wordpress-Settings-Page. Includes live compilation of SCSS!

Bootstrap-Theme-Generator Bootstrap Theme Generator enables you to choose which components of Bootstrap you want to load. It also gives you the possib

null 3 Aug 15, 2022
Record the change log from models in Laravel

This package will help you understand changes in your Eloquent models, by providing information about possible discrepancies and anomalies that could

Owen IT Services 2.5k Dec 30, 2022
A simple Laravel event log package for easy model based logging.

Karacraft Logman A simple Model Event Logging Package Usage Installation composer require karacraft/logman Migrate php artisan migrate Publish php a

Karacraft 0 Dec 28, 2021
Log user authentication actions in Laravel.

Laravel Auth Log The laravel-auth-log package will log all the default Laravel authentication events (Login, Attempting, Lockout, etc.) to your databa

Label84 29 Dec 8, 2022
Log executed Laravel SQL queries and their line number and more

A lightweight laravel package for logging executed SQL queries, line number and more

Md.Harun-Ur-Rashid 31 Dec 21, 2022
Laravel Email Audit Log

This service provider will monitor all emails that has been sent out of your system. Sent emails will be stored in email_audit_log table

Aleksandar Djokic 9 Sep 27, 2022