SoftDeletedInDatabase
extends Constraint
in package
Table of Contents
- $data : array<string|int, mixed>
- The data that will be used to narrow the search in the database table.
- $database : Connection
- The database connection.
- $show : int
- Number of records that will be shown in the console in case of failure.
- __construct() : void
- Create a new constraint instance.
- failureDescription() : string
- Get the description of the failure.
- matches() : bool
- Check if the data is found in the given table.
- toString() : string
- Get a string representation of the object.
- getAdditionalInfo() : string
- Get additional info about the records found in the database table.
Properties
$data
The data that will be used to narrow the search in the database table.
protected
array<string|int, mixed>
$data
$database
The database connection.
protected
Connection
$database
$show
Number of records that will be shown in the console in case of failure.
protected
int
$show
= 3
Methods
__construct()
Create a new constraint instance.
public
__construct(Connection $database, array<string|int, mixed> $data) : void
Parameters
- $database : Connection
- $data : array<string|int, mixed>
Return values
void —failureDescription()
Get the description of the failure.
public
failureDescription(string $table) : string
Parameters
- $table : string
Return values
string —matches()
Check if the data is found in the given table.
public
matches(string $table) : bool
Parameters
- $table : string
Return values
bool —toString()
Get a string representation of the object.
public
toString() : string
Return values
string —getAdditionalInfo()
Get additional info about the records found in the database table.
protected
getAdditionalInfo(string $table) : string
Parameters
- $table : string