name: AsPivot
class_comment: null
dependencies:
- name: Model
  type: class
  source: Illuminate\Database\Eloquent\Model
- name: Str
  type: class
  source: Illuminate\Support\Str
properties:
- name: pivotParent
  visibility: public
  comment: '# * The parent model of the relationship.

    # *

    # * @var \Illuminate\Database\Eloquent\Model'
- name: foreignKey
  visibility: protected
  comment: '# * The name of the foreign key column.

    # *

    # * @var string'
- name: relatedKey
  visibility: protected
  comment: '# * The name of the "other key" column.

    # *

    # * @var string'
methods:
- name: fromAttributes
  visibility: public
  parameters:
  - name: parent
  - name: attributes
  - name: table
  - name: exists
    default: 'false'
  comment: "# * The parent model of the relationship.\n# *\n# * @var \\Illuminate\\\
    Database\\Eloquent\\Model\n# */\n# public $pivotParent;\n# \n# /**\n# * The name\
    \ of the foreign key column.\n# *\n# * @var string\n# */\n# protected $foreignKey;\n\
    # \n# /**\n# * The name of the \"other key\" column.\n# *\n# * @var string\n#\
    \ */\n# protected $relatedKey;\n# \n# /**\n# * Create a new pivot model instance.\n\
    # *\n# * @param  \\Illuminate\\Database\\Eloquent\\Model  $parent\n# * @param\
    \  array  $attributes\n# * @param  string  $table\n# * @param  bool  $exists\n\
    # * @return static"
- name: fromRawAttributes
  visibility: public
  parameters:
  - name: parent
  - name: attributes
  - name: table
  - name: exists
    default: 'false'
  comment: '# * Create a new pivot model from raw values returned from a query.

    # *

    # * @param  \Illuminate\Database\Eloquent\Model  $parent

    # * @param  array  $attributes

    # * @param  string  $table

    # * @param  bool  $exists

    # * @return static'
- name: setKeysForSelectQuery
  visibility: protected
  parameters:
  - name: query
  comment: '# * Set the keys for a select query.

    # *

    # * @param  \Illuminate\Database\Eloquent\Builder<static>  $query

    # * @return \Illuminate\Database\Eloquent\Builder<static>'
- name: setKeysForSaveQuery
  visibility: protected
  parameters:
  - name: query
  comment: '# * Set the keys for a save update query.

    # *

    # * @param  \Illuminate\Database\Eloquent\Builder<static>  $query

    # * @return \Illuminate\Database\Eloquent\Builder<static>'
- name: delete
  visibility: public
  parameters: []
  comment: '# * Delete the pivot model record from the database.

    # *

    # * @return int'
- name: getDeleteQuery
  visibility: protected
  parameters: []
  comment: '# * Get the query builder for a delete operation on the pivot.

    # *

    # * @return \Illuminate\Database\Eloquent\Builder<static>'
- name: getTable
  visibility: public
  parameters: []
  comment: '# * Get the table associated with the model.

    # *

    # * @return string'
- name: getForeignKey
  visibility: public
  parameters: []
  comment: '# * Get the foreign key column name.

    # *

    # * @return string'
- name: getRelatedKey
  visibility: public
  parameters: []
  comment: '# * Get the "related key" column name.

    # *

    # * @return string'
- name: getOtherKey
  visibility: public
  parameters: []
  comment: '# * Get the "related key" column name.

    # *

    # * @return string'
- name: setPivotKeys
  visibility: public
  parameters:
  - name: foreignKey
  - name: relatedKey
  comment: '# * Set the key names for the pivot model instance.

    # *

    # * @param  string  $foreignKey

    # * @param  string  $relatedKey

    # * @return $this'
- name: hasTimestampAttributes
  visibility: public
  parameters:
  - name: attributes
    default: 'null'
  comment: '# * Determine if the pivot model or given attributes has timestamp attributes.

    # *

    # * @param  array|null  $attributes

    # * @return bool'
- name: getCreatedAtColumn
  visibility: public
  parameters: []
  comment: '# * Get the name of the "created at" column.

    # *

    # * @return string'
- name: getUpdatedAtColumn
  visibility: public
  parameters: []
  comment: '# * Get the name of the "updated at" column.

    # *

    # * @return string'
- name: getQueueableId
  visibility: public
  parameters: []
  comment: '# * Get the queueable identity for the entity.

    # *

    # * @return mixed'
- name: newQueryForRestoration
  visibility: public
  parameters:
  - name: ids
  comment: '# * Get a new query to restore one or more models by their queueable IDs.

    # *

    # * @param  int[]|string[]|string  $ids

    # * @return \Illuminate\Database\Eloquent\Builder<static>'
- name: newQueryForCollectionRestoration
  visibility: protected
  parameters:
  - name: ids
  comment: '# * Get a new query to restore multiple models by their queueable IDs.

    # *

    # * @param  int[]|string[]  $ids

    # * @return \Illuminate\Database\Eloquent\Builder<static>'
- name: unsetRelations
  visibility: public
  parameters: []
  comment: '# * Unset all the loaded relations for the instance.

    # *

    # * @return $this'
traits:
- Illuminate\Database\Eloquent\Model
- Illuminate\Support\Str
interfaces: []