\Dvivier\SmarticopsSmarticopsClass

The features of the Smarticops Facade.

Permissions features are managed in Models, this class manages logging features.

Each method logs a specific action, accepts parameters related to this action, and a boolean representing the success or failure of the operation. Each specific log method uses the generic log() method, which will add info

It is named SmarticopsClass to differentiate from Facade\Smarticops to avoid confusion

Summary

Methods
Properties
Constants
test()
log()
logError()
logAttempt()
logLogin()
logLogout()
logLockout()
logPasswordResetRequest()
logPasswordResetClicked()
logPasswordReset()
logUserCreated()
logUserUpdated()
logUserDeleted()
logAssignRole()
logRevokeRole()
logPermissionGivenToUser()
logPermissionRemovedFromUser()
logPermissionGivenToRole()
logPermissionRemovedFromRole()
logPermissionCreated()
logPermissionUpdated()
logPermissionDeleted()
logRoleCreated()
logRoleUpdated()
logRoleDeleted()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

test()

test() 

log()

log(string  $txt, array  $context = array(), string  $type = 'info') 

The generic log() method

Saves each log information in the daily log file AND in the logs table of the database. For each logs it adds the id of the user that is currently logged in.

Parameters

string $txt

The text to log

array $context

array of data to add to the text

string $type

The type of log

logError()

logError(  $txt,   $context = array(),   $type = 'error') 

Parameters

$txt
$context
$type

logAttempt()

logAttempt(  $email) 

Parameters

$email

logLogin()

logLogin(\Dvivier\Smarticops\User  $user,   $success = true,   $remember = false) 

Parameters

\Dvivier\Smarticops\User $user
$success
$remember

logLockout()

logLockout(  $email) 

Parameters

$email

logPasswordResetRequest()

logPasswordResetRequest(\Illuminate\Http\Request  $request,   $res = true) 

Parameters

\Illuminate\Http\Request $request
$res

logPasswordResetClicked()

logPasswordResetClicked(\Illuminate\Http\Request  $request,   $token) 

Parameters

\Illuminate\Http\Request $request
$token

logPasswordReset()

logPasswordReset(\Illuminate\Http\Request  $request,   $res = true) 

Parameters

\Illuminate\Http\Request $request
$res

logUserCreated()

logUserCreated(\Dvivier\Smarticops\User  $user,   $res = true,   $context = array()) 

Parameters

\Dvivier\Smarticops\User $user
$res
$context

logUserDeleted()

logUserDeleted(\Dvivier\Smarticops\User  $user,   $res = true) 

Parameters

\Dvivier\Smarticops\User $user
$res

logPermissionCreated()

logPermissionCreated(\Dvivier\Smarticops\Permission  $permission,   $res = true,   $context = array()) 

Parameters

\Dvivier\Smarticops\Permission $permission
$res
$context

logPermissionDeleted()

logPermissionDeleted(\Dvivier\Smarticops\Permission  $permission,   $res = true) 

Parameters

\Dvivier\Smarticops\Permission $permission
$res

logRoleCreated()

logRoleCreated(\Dvivier\Smarticops\Role  $role,   $res = true,   $context = array()) 

Parameters

\Dvivier\Smarticops\Role $role
$res
$context

logRoleDeleted()

logRoleDeleted(\Dvivier\Smarticops\Role  $role,   $res = true) 

Parameters

\Dvivier\Smarticops\Role $role
$res