Documentation

RescueCode extends Model
in package
Uses HasCompositePrimaryKey

RescueCode Model Inherits from the Model class of Laravel

Tags
author

Guillaume ARNOUX

Table of Contents

$code  : int
$incrementing  : mixed
$timestamps  : mixed
$user  : int
$guarded  : mixed
$keyType  : mixed
$primaryKey  : mixed
$table  : mixed
create()  :
find()  : mixed|static
Execute a query for a single record by ID.
findOrFail()  : Model|Collection
Find a model by its primary key or throw an exception.
getIncrementing()  : bool
Get the value indicating whether the IDs are incrementing.
getKey()  : mixed
Get the value of the model's primary key.
refresh()  : $this
Reload the current model instance with fresh attributes from the database.
whereUser()  :
whereUserAndCode()  :
setKeysForSaveQuery()  : Builder
Set the keys for a save update query.

Properties

$incrementing

public mixed $incrementing = false

$guarded

protected mixed $guarded = ['created_at']

$primaryKey

protected mixed $primaryKey = ['user', 'code']

$table

protected mixed $table = 'totp_rescue_codes'

Methods

create()

public static create(array<string|int, mixed> $array) :

Eloquent method

Parameters
$array : array<string|int, mixed>
Return values

find()

Execute a query for a single record by ID.

public static find(array<string|int, mixed> $ids[, array<string|int, mixed> $columns = ['*'] ]) : mixed|static
Parameters
$ids : array<string|int, mixed>

Array of keys, like [column => value].

$columns : array<string|int, mixed> = ['*']
Return values
mixed|static

findOrFail()

Find a model by its primary key or throw an exception.

public static findOrFail(mixed $ids[, array<string|int, mixed> $columns = ['*'] ]) : Model|Collection
Parameters
$ids : mixed
$columns : array<string|int, mixed> = ['*']
Tags
throws
ModelNotFoundException
Return values
Model|Collection

getIncrementing()

Get the value indicating whether the IDs are incrementing.

public getIncrementing() : bool
Return values
bool

getKey()

Get the value of the model's primary key.

public getKey() : mixed
Return values
mixed

refresh()

Reload the current model instance with fresh attributes from the database.

public refresh() : $this
Return values
$this

whereUser()

public static whereUser(int $user_id) :

Eloquent method

Parameters
$user_id : int
Return values

whereUserAndCode()

public static whereUserAndCode(mixed $user_id, int $rescue) :

Eloquent method

Parameters
$user_id : mixed
$rescue : int
Return values

setKeysForSaveQuery()

Set the keys for a save update query.

protected setKeysForSaveQuery(Builder $query) : Builder
Parameters
$query : Builder
Return values
Builder

Search results