Skip to content

Commit 956c95e

Browse files
authored
Merge pull request #16 from kartiksprajapati/patch-1
TYPO: fixed spelling from `expect` to `except`
2 parents 501923f + eefc6a5 commit 956c95e

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ If you want to disable monitoring for specific pages you can go to `user-monitor
169169
/*
170170
* You can specify pages not to be monitored.
171171
*/
172-
'expect_pages' => [
172+
'except_pages' => [
173173
'home',
174174
'admin/dashboard',
175175
],

config/user-monitoring.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
/*
5050
* You can specify pages not to be monitored.
5151
*/
52-
'expect_pages' => [
52+
'except_pages' => [
5353
// 'home',
5454
],
5555

src/Middlewares/VisitMonitoringMiddleware.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ public function handle(Request $request, Closure $next)
2525

2626
$agent = new Agent();
2727
$guard = config('user-monitoring.user.guard', 'web');
28-
$exceptPages = config('user-monitoring.visit_monitoring.expect_pages', []);
28+
$exceptPages = config('user-monitoring.visit_monitoring.except_pages', []);
2929

30-
if (empty($exceptPages) || !$this->checkIsExpectPages($request->path(), $exceptPages)) {
30+
if (empty($exceptPages) || !$this->checkIsExceptPages($request->path(), $exceptPages)) {
3131
// Store visit
3232
DB::table(config('user-monitoring.visit_monitoring.table'))->insert([
3333
'user_id' => auth($guard)->id(),
@@ -51,7 +51,7 @@ public function handle(Request $request, Closure $next)
5151
* @param array $exceptPages
5252
* @return bool
5353
*/
54-
private function checkIsExpectPages(string $page, array $exceptPages)
54+
private function checkIsExceptPages(string $page, array $exceptPages)
5555
{
5656
return collect($exceptPages)->contains($page);
5757
}

tests/Feature/VisitMonitoringTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
});
3939

4040
test('check except pages are not store', function () {
41-
config()->set('user-monitoring.visit_monitoring.expect_pages', ['/']);
41+
config()->set('user-monitoring.visit_monitoring.except_pages', ['/']);
4242

4343
$response = get('/');
4444
$response->assertContent('milwad');

0 commit comments

Comments
 (0)