Skip to content

Commit

Permalink
add config option
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Apr 3, 2018
1 parent 5b6f4d0 commit 13e5ea8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 26 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,9 @@

All notable changes to `spatie/laravel-activitylog` will be documented in this file

## 2.6.0 - 2018-04-03
- add `table_name` config option

## 2.5.1 - 2018-02-11
- improve support for soft deletes

Expand Down
47 changes: 28 additions & 19 deletions README.md
Expand Up @@ -109,38 +109,47 @@ This is the contents of the published config file:
```php
return [

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

/**
* Running the clean-command will delete all activities
* older than the number of days specified here.
/*
* 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,


/**
* When not specifying a log name when logging activity
* we'll using this log name.
/*
* 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,

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


/**
* The model used to log the activities.
* It should be or extend the Spatie\Activitylog\Models\Activity model.
'subject_returns_soft_deleted_models' => false,

/*
* This model will be used to log activity. The only requirement is that
* it should be or extend the Spatie\Activitylog\Models\Activity model.
*/
'activity_model' => \Spatie\Activitylog\Models\Activity::class,
'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',
];

```

## Changelog
Expand Down
13 changes: 6 additions & 7 deletions config/activitylog.php
@@ -1,6 +1,5 @@
<?php


return [

/*
Expand Down Expand Up @@ -31,15 +30,15 @@
*/
'subject_returns_soft_deleted_models' => false,

/*
* This is the name of the table that will be created to store
* the logs. Feel free to update it according to your needs.
*/
'table_name' => 'activity_log',

/*
* This model will be used to log activity. The only requirement is that
* it should be or extend the Spatie\Activitylog\Models\Activity 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',
];

0 comments on commit 13e5ea8

Please sign in to comment.