Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel pivot select fields

public function products()
{
    return $this->belongsToMany('DuplicolorModelsProductLine', 'project_products', 'project_post_id', 'product_line_id')->withPivot('id');
}
 
PREVIOUS NEXT
Tagged: #laravel #pivot #select #fields
ADD COMMENT
Topic
Name
4+3 =