AccessLog
extends Model
in package
Backend\Models\AccessLog
Tags
Table of Contents
- $belongsTo : array<string|int, mixed>
- $created_at : Carbon|null
- $id : int
- $ip_address : string|null
- $updated_at : Carbon|null
- $user_id : int
- $table : string
- add() : self
- Creates a log record
- all() :
- get() :
- getRecent() : self
- Returns a recent entry, latest entry is not considered recent if the creation day is the same as today.
- newModelQuery() :
- newQuery() :
- query() :
- whereCreatedAt() :
- whereId() :
- whereIpAddress() :
- whereUpdatedAt() :
- whereUserId() :
Properties
$belongsTo
public
array<string|int, mixed>
$belongsTo
= ['user' => BackendModelsUser::class]
Relations
$created_at
public
Carbon|null
$created_at
$id
public
int
$id
$ip_address
public
string|null
$ip_address
$updated_at
public
Carbon|null
$updated_at
$user_id
public
int
$user_id
$table
protected
string
$table
= 'backend_access_log'
The database table used by the model.
Methods
add()
Creates a log record
public
static add(User $user) : self
Parameters
- $user : User
-
Admin user
Return values
self —all()
public
static all(mixed $columns) :
Parameters
- $columns : mixed
Return values
—get()
public
static get(mixed $columns) :
Parameters
- $columns : mixed
Return values
—getRecent()
Returns a recent entry, latest entry is not considered recent if the creation day is the same as today.
public
static getRecent(mixed $user) : self
Parameters
- $user : mixed
Return values
self —newModelQuery()
public
static newModelQuery() :
Return values
—newQuery()
public
static newQuery() :
Return values
—query()
public
static query() :
Return values
—whereCreatedAt()
public
static whereCreatedAt(mixed $value) :
Parameters
- $value : mixed
Return values
—whereId()
public
static whereId(mixed $value) :
Parameters
- $value : mixed
Return values
—whereIpAddress()
public
static whereIpAddress(mixed $value) :
Parameters
- $value : mixed
Return values
—whereUpdatedAt()
public
static whereUpdatedAt(mixed $value) :
Parameters
- $value : mixed
Return values
—whereUserId()
public
static whereUserId(mixed $value) :
Parameters
- $value : mixed