Class Has_Many_And_Belongs_To
- Laravel\Database\Eloquent\Query
- Laravel\Database\Eloquent\Relationships\Relationship
- Laravel\Database\Eloquent\Relationships\Has_Many_And_Belongs_To
Namespace: Laravel\Database\Eloquent\Relationships
Located at laravel/database/eloquent/relationships/has_many_and_belongs_to.php
Located at laravel/database/eloquent/relationships/has_many_and_belongs_to.php
public
|
#
__construct(
Create a new many to many relationship instance. |
protected
string
|
|
public
array
|
|
public
boolean
|
#
attach(
Insert a new record into the joining table of the association. |
public
boolean
|
#
detach( array|
Detach a record from the joining table of the association. |
public
boolean
|
|
public
boolean
|
#
insert(
Insert a new record for the association. |
public
integer
|
|
protected
array
|
|
protected
|
#
insert_joining( array $attributes )
Insert a new record into the joining table of the association. |
protected
Query
|
|
protected
|
|
protected
|
#
set_select( string $foreign, string $other )
Set the SELECT clause on the query builder for the relationship. |
protected
|
|
protected
|
|
public
|
#
initialize( array & $parents, string $relationship )
Initialize a relationship on an array of parent models. |
public
|
#
eagerly_constrain( array $results )
Set the proper constraints on the relationship table for an eager load. |
public
|
|
protected
|
|
public
|
|
public
|
|
protected
string
|
|
protected
string
|
foreign(),
foreign_key(),
fresh_model(),
keys()
|
__call(),
connection(),
find(),
first(),
get(),
hydrate(),
load(),
model_includes(),
nested_includes(),
paginate(),
table()
|
protected
string
|
$joining |
|
#
The name of the intermediate, joining table. |
protected
string
|
$other |
|
#
The other or "associated" key. This is the foreign key of the related model. |
protected
array
|
$with | array('id') |
#
The columns on the joining table that should be fetched. |
$base
|
$includes,
$model,
$passthru,
$table
|