Activity Log for Backpack

dev-main 2023-04-04 11:19 UTC

This package is auto-updated.

Last update: 2023-05-04 11:26:18 UTC


The Whole Fruit Manifesto

This package adds a web interface that shows the activity log for projects that use Backpack for Laravel. It relies on Spatie laravel-activitylog package, if you need further information on how to use it, head to

How does it all work? Well:

  • when a change happens to an Eloquent model, the Spatie package will make a note of it in the database;
  • this package adds a web interface, so the admin can see the changes (aka activity log);


Don't belive how simple it is to use? Go ahead, try it right now, in our online demo. Edit some other entities, and check the activity logs page to see the changes.


Before official release, you need to add this to your composer.json's repositories section before you can install it, because the package hasn't been submitted to Packagist yet. This step should be removed before official release.

        "type": "vcs",
        "url": ""

In your Laravel + Backpack project:

# install the package
composer require backpack/activity-log

# publish and run the migrations
php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="activitylog-migrations"
php artisan migrate

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

# optional: add a sidebar entry item for the Activity Logs page
php artisan backpack:add-sidebar-content "<li class='nav-item'><a class='nav-link' href='{{ backpack_url('activity-log') }}'><i class='nav-icon la la-stream'></i> Activity Logs</a></li>"


Inside all the Models you want to be logged, add the usage of the LogsActivity Trait:


namespace App\Models;

use Backpack\CRUD\app\Models\Traits\CrudTrait;
+use Backpack\ActivityLog\Traits\LogsActivity;

class Article extends Model
    use CrudTrait;
+   use LogsActivity;


TODO: questions to answer:

  • What gets logged by default?
  • How do you customize what gets logged?
  • How do you customize the interface, if needed?


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



This project was released under EULA, so you can install it on top of any Backpack & Laravel project. Please see the license file for more information.