final class ForeignKey implements Stringable

Database ForeignKey Object.

Methods

__construct(string $name, string $table, string $column, string $referenced_table, string $referenced_column)

ForeignKey constructor.

array
toArray()

Get column information array.

static ForeignKey
make(string $name, string $table, string $column, string $referenced_table, string $referenced_column)

Create a instance.

string
belongsTo()

Get the belongsTo relation from this model to another.

string
hasMany()

Get the hasMany relation from another model to this.

string
__toString()

Class magic method to get the instance information for a Exception

Details

at line 22
__construct(string $name, string $table, string $column, string $referenced_table, string $referenced_column)

ForeignKey constructor.

Parameters

string $name

Name of the key

string $table

Table name

string $column

Column name

string $referenced_table

Referenced table name

string $referenced_column

Referenced column name

at line 36
array toArray()

Get column information array.

Return Value

array

The method returns column information array

at line 56
static ForeignKey make(string $name, string $table, string $column, string $referenced_table, string $referenced_column)

Create a instance.

Parameters

string $name

Name of the key

string $table

Table name

string $column

Column name

string $referenced_table

Referenced table name

string $referenced_column

Referenced column name

Return Value

ForeignKey

at line 77
string belongsTo()

Get the belongsTo relation from this model to another.

Return Value

string

The method returns a relation function string

at line 95
string hasMany()

Get the hasMany relation from another model to this.

Return Value

string

The method returns a relation function string

at line 113
string __toString()

Class magic method to get the instance information for a Exception

Return Value

string

The method returns the instance information for a Exception