Skip to content

Instantly share code, notes, and snippets.

@XenitXTD
Last active May 23, 2020 07:41
Show Gist options
  • Save XenitXTD/84032f5276a6a5a67bfe70b6766b67dc to your computer and use it in GitHub Desktop.
Save XenitXTD/84032f5276a6a5a67bfe70b6766b67dc to your computer and use it in GitHub Desktop.
Laravel Belongs to Many Override
/**
* Define a many-to-many relationship.
*
* @param string $related
* @param string $table
* @param string $foreignPivotKey
* @param string $relatedPivotKey
* @param string $parentKey
* @param string $relatedKey
* @param string $relation
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function belongsToMany($related, $table = null, $foreignPivotKey = null,
$relatedPivotKey = null,$parentKey = null,
$relatedKey = null, $relation = null)
{
//
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment