Skip to content

eminiarts/aura-cms-activity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aura CMS Plugin: activity

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This Package is a Plugin for the Aura CMS. It logs activities of the resources using spatie's activitylog package.

Installation

You can install the package via composer:

composer require eminiarts/aura-cms-activity

Publish Spatie's Activitylog package and run the migrations:

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

php artisan migrate

Use this trait in your Resource to Log Activity:

use Aura\Activity\LogActivity;

class News extends Resource
{
    use LogActivity;
// ...
}

Fields to be logged can be defined in the resource:

[
    'name' => 'Aktivität',
    'type' => 'Aura\\Base\\Fields\\Tab',
    'validation' => '',
    'global' => true,
    'conditional_logic' => function () {
        return auth()->user()->isSuperAdmin();
    },
    'slug' => 'tab-activity',
],
[
    'name' => 'Aktivität',
    'type' => 'Aura\\Base\\Fields\\View',
    'validation' => '',
    'on_view' => true,
    'view' => 'aura-cms-activity::activity',

    'slug' => 'aktivitaet',
],

Optionally, you can publish the views using

php artisan vendor:publish --tag="aura-cms-activity-views"

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published