Support the ongoing development of Laravel.io →

sixteenstudio

Joined 6 Mar 2014

Statistics

Threads 3
Replies 4
Solutions 1
Articles 0

ValidatesWhenResolved Trait - Where is the validate method ever called?

Myself and a co-worker have been trying to find the source of the magic behind the ValidatesWhenReso...

0 Likes
1 Replies

Route group wildcard prefix stops matching of non-wildcard defined routes

I have a route group that has a parameter prefix like so: Route::group(array('prefix' => '{countr...

0 Likes
1 Replies

Custom Pivot Model - Doing belongsToMany uses parent model id, NOT pivot model id

I have a Product model, an Option model, and a ProductOptionPivot model. A collection of Option mode...

0 Likes
6 Replies
Solved
replied 10 years ago

Custom Pivot Model - Doing belongsToMany uses parent model id, NOT pivot model id

Solved it - had to do ->withPivot('id') on the Product->belongsToMany('Option') relationship s...

0 Likes
Solved
replied 10 years ago

Custom Pivot Model - Doing belongsToMany uses parent model id, NOT pivot model id

product_option_country is a second pivot table, between the ProductOptionPivot model and the Country...

0 Likes
replied 10 years ago

Custom Pivot Model - Doing belongsToMany uses parent model id, NOT pivot model id

The following code (including authentication before the route) $options = Product::find(18)->opti...

0 Likes
replied 10 years ago

How can I access additional models from a pivot?

This is great, but how would this then work with multiple pivot tables? Surely this solution would m...

0 Likes

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.