@@ -22,9 +22,9 @@ |
||
22 | 22 | return redirect(url($adminPath.'/login'))->with('message', cbTrans('not_logged_in')); |
23 | 23 | } |
24 | 24 | |
25 | - if(!CRUDBooster::isSuperadmin()) { |
|
25 | + if (!CRUDBooster::isSuperadmin()) { |
|
26 | 26 | event('cb.unauthorizedTryToSuperAdminArea', [cbUser(), request()->fullUrlWithQuery()]); |
27 | - return redirect($adminPath)->with(['message'=> cbTrans('denied_access'),'message_type'=>'warning']); |
|
27 | + return redirect($adminPath)->with(['message'=> cbTrans('denied_access'), 'message_type'=>'warning']); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | return $next($request); |
@@ -18,21 +18,21 @@ discard block |
||
18 | 18 | |
19 | 19 | private static function forgottenPass() |
20 | 20 | { |
21 | - Event::listen('cb.forgottenPasswordRequested', function (string $email, string $ip) { |
|
22 | - self::insertLog('Password Recovery Requested for '. $email); |
|
21 | + Event::listen('cb.forgottenPasswordRequested', function(string $email, string $ip) { |
|
22 | + self::insertLog('Password Recovery Requested for '.$email); |
|
23 | 23 | }); |
24 | 24 | } |
25 | 25 | |
26 | 26 | private static function logOut() |
27 | 27 | { |
28 | - Event::listen('cb.userLoggedOut', function (CbUser $user) { |
|
28 | + Event::listen('cb.userLoggedOut', function(CbUser $user) { |
|
29 | 29 | self::insertLog('Logout '.$user->email); |
30 | 30 | }); |
31 | 31 | } |
32 | 32 | |
33 | 33 | private static function logIn() |
34 | 34 | { |
35 | - Event::listen('cb.userLoggedIn', function (CbUser $user, $time, $ip) { |
|
35 | + Event::listen('cb.userLoggedIn', function(CbUser $user, $time, $ip) { |
|
36 | 36 | self::insertLog('Login '.$user->email); |
37 | 37 | }); |
38 | 38 | } |
@@ -44,12 +44,12 @@ discard block |
||
44 | 44 | |
45 | 45 | private static function illegalAccessTry() |
46 | 46 | { |
47 | - Event::listen('cb.unauthorizedTryToSuperAdminArea', function (CbUser $user, $fullUrl) { |
|
48 | - self::insertLog('Warning - Try To Access Unauthorized Super Admin Area at: '. $fullUrl, $user->id); |
|
47 | + Event::listen('cb.unauthorizedTryToSuperAdminArea', function(CbUser $user, $fullUrl) { |
|
48 | + self::insertLog('Warning - Try To Access Unauthorized Super Admin Area at: '.$fullUrl, $user->id); |
|
49 | 49 | }); |
50 | 50 | |
51 | - Event::listen('cb.unauthorizedTryStopped', function (CbUser $user, $fullUrl) { |
|
52 | - self::insertLog('Warning - Try To Access Unauthorized Resource at: '. $fullUrl, $user->id); |
|
51 | + Event::listen('cb.unauthorizedTryStopped', function(CbUser $user, $fullUrl) { |
|
52 | + self::insertLog('Warning - Try To Access Unauthorized Resource at: '.$fullUrl, $user->id); |
|
53 | 53 | }); |
54 | 54 | |
55 | 55 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | private static function delete() |
19 | 19 | { |
20 | - Event::listen('cb.dataDeleted', function (string $table, array $ids, string $time, CbUser $user) { |
|
20 | + Event::listen('cb.dataDeleted', function(string $table, array $ids, string $time, CbUser $user) { |
|
21 | 21 | $ids = implode(', ', $ids); |
22 | 22 | self::insertLog("Data deleted from $table table with Ids: $ids at $time", $user->id); |
23 | 23 | }); |
@@ -30,21 +30,21 @@ discard block |
||
30 | 30 | |
31 | 31 | private static function create() |
32 | 32 | { |
33 | - Event::listen('cb.dataInserted', function (string $table, int $id, string $time, CbUser $user) { |
|
33 | + Event::listen('cb.dataInserted', function(string $table, int $id, string $time, CbUser $user) { |
|
34 | 34 | self::insertLog("Data inserted into $table table with Id: $id at $time", $user->id); |
35 | 35 | }); |
36 | 36 | } |
37 | 37 | |
38 | 38 | private static function update() |
39 | 39 | { |
40 | - Event::listen('cb.dataUpdated', function (string $table, int $id, string $time, CbUser $user) { |
|
40 | + Event::listen('cb.dataUpdated', function(string $table, int $id, string $time, CbUser $user) { |
|
41 | 41 | self::insertLog("Data updated within $table table with Id: $id at $time", $user->id); |
42 | 42 | }); |
43 | 43 | } |
44 | 44 | |
45 | 45 | private static function deleteImage() |
46 | 46 | { |
47 | - Event::listen('cb.imageDeleted', function (string $table, array $prop, string $time, CbUser $user) { |
|
47 | + Event::listen('cb.imageDeleted', function(string $table, array $prop, string $time, CbUser $user) { |
|
48 | 48 | $file = $prop['file']; |
49 | 49 | $id = $prop['id']; |
50 | 50 | self::insertLog("($file) Image deleted from $table table with Id: $id at $time", $user->id); |
@@ -17,9 +17,9 @@ |
||
17 | 17 | public function boot() |
18 | 18 | { |
19 | 19 | $this->loadViewsFrom(__DIR__.'/views', 'CbLogger'); |
20 | - $this->loadRoutesFrom( __DIR__.'/logs_routes.php'); |
|
20 | + $this->loadRoutesFrom(__DIR__.'/logs_routes.php'); |
|
21 | 21 | $this->publishes([__DIR__.'/localization' => resource_path('lang')], 'cb_localization'); |
22 | - $this->loadMigrationsFrom(__DIR__ . '/migrations'); |
|
22 | + $this->loadMigrationsFrom(__DIR__.'/migrations'); |
|
23 | 23 | Auth::registerListeners(); |
24 | 24 | CRUD::registerListeners(); |
25 | 25 | app('CbDynamicMenus')->addMenu('CbLogger::log'); |