rockbuzz/lara-activities
Lara Activities is a package that monitors activities for creating, editing, and deleting features, including manipulations of related tables.
5,180
2
| Install | |
|---|---|
composer require rockbuzz/lara-activities |
|
| Latest Version: | 3.1.2 |
| PHP: | >=7.3 |
| License: | MIT |
| Last Updated: | Jul 30, 2025 |
| Links: | GitHub · Packagist |
Maintainer: rockbuzz
Lara Activities
Lara Activities is a Laravel package that monitors activities for creating, editing, and deleting features, including manipulations of related tables.
Requirements
PHP: >=7.3
Install
$ composer require rockbuzz/lara-activities
$ php artisan vendor:publish --provider="Rockbuzz\LaraActivities\ServiceProvider" --tag=migrations
$ php artisan migrate
Usage
namespace App;
use Illuminate\Database\Eloquent\Model;
use Rockbuzz\LaraActivities\Traits\RecordsActivity;
class Post extends Model
{
use RecordsActivity;
//optional define activity table
//public function __construct(array $attributes = [])
//{
// parent::__construct($attributes);
//
// $this->activityTable = 'post_activities';
//}
}
Configuration
$ php artisan vendor:publish --provider="Rockbuzz\LaraActivities\ServiceProvider" --tag=config
You can define the layout of the views
'views' => [
'layout' => 'layouts.admin'
]
You can override routes, controllers and middleware
'routes' => [
'index' => [
'uri' => 'admin/activities',
'as' => 'admin.activities',
'middleware' => ['web', 'auth'],
'uses' => 'Rockbuzz\LaraActivities\Controllers\ActivitiesController@index'
]
]
You can define which models will be searched in the activity table
'subjects_class' => [
'App\Post', 'App\Comment'
],
You can also customize the views
$ php artisan vendor:publish --provider="Rockbuzz\LaraActivities\ServiceProvider" --tag=views
You can also customize the lang
$ php artisan vendor:publish --provider="Rockbuzz\LaraActivities\ServiceProvider" --tag=lang
License
The Lara Activities is open-sourced software licensed under the MIT license.