From e94b1b4952aad82ff4441cd44dade2172e6f4c4d Mon Sep 17 00:00:00 2001 From: Mulia Arifandi Nasution Date: Wed, 6 Apr 2016 18:00:11 +0700 Subject: [PATCH 1/2] Remove trailing whitespaces --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9992cb7..0329e6a 100644 --- a/README.md +++ b/README.md @@ -125,13 +125,13 @@ public function getActivityDescriptionForEvent($eventName) The result of this function will be logged, unless the result is an empty string. ### Using a before handler. -If you want to disable logging under certain conditions, +If you want to disable logging under certain conditions, such as for a specific user, create a class in your application -namespace that implements the `Spatie\Activitylog\Handlers\BeforeHandlerInterface`. +namespace that implements the `Spatie\Activitylog\Handlers\BeforeHandlerInterface`. This interface defines an `shouldLog()` method in which you can code any custom logic to determine whether logging should be ignored or not. You must return `true` the call should be logged. - + To en the namespaced class nameto the `beforeHandler` field in the configuration file: ```php 'beforeHandler' => '\App\Handlers\BeforeHandler', @@ -151,7 +151,7 @@ class BeforeHandler implements BeforeHandlerInterface public function shouldLog($text, $userId) { if ($userId == 1) return false; - + return true; } } From 825370c4cfc9650ef6bbd361d6d87764833777a2 Mon Sep 17 00:00:00 2001 From: Mulia Arifandi Nasution Date: Wed, 6 Apr 2016 18:00:56 +0700 Subject: [PATCH 2/2] Remove double Contributing info --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 0329e6a..471ced1 100644 --- a/README.md +++ b/README.md @@ -166,10 +166,6 @@ use Spatie\Activitylog\Models\Activity; $latestActivities = Activity::with('user')->latest()->limit(100)->get(); ``` -## Contributing - -Please see [CONTRIBUTING](CONTRIBUTING.md) for details. - ### Cleaning up the log Over time your log will grow. To clean up the database table you can run this command: