class SoftDeletedInDatabase extends Constraint (View source)

Properties

protected int $show

Number of records that will be shown in the console in case of failure.

protected Connection $database

The database connection.

protected array $data

The data that will be used to narrow the search in the database table.

protected string $deletedAtColumn

The name of the column that indicates soft deletion has occurred.

Methods

void
__construct(Connection $database, array $data, string $deletedAtColumn)

Create a new constraint instance.

bool
matches(string $table)

Check if the data is found in the given table.

string
failureDescription(string $table)

Get the description of the failure.

string
getAdditionalInfo(string $table)

Get additional info about the records found in the database table.

string
toString()

Get a string representation of the object.

Details

void __construct(Connection $database, array $data, string $deletedAtColumn)

Create a new constraint instance.

Parameters

Connection $database
array $data
string $deletedAtColumn

Return Value

void

bool matches(string $table)

Check if the data is found in the given table.

Parameters

string $table

Return Value

bool

string failureDescription(string $table)

Get the description of the failure.

Parameters

string $table

Return Value

string

protected string getAdditionalInfo(string $table)

Get additional info about the records found in the database table.

Parameters

string $table

Return Value

string

string toString()

Get a string representation of the object.

Return Value

string

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.