eloquent - Can't access custom pivot element (Laravel framework) -


i created relation between user , event. added pivot element 'part_sure' pivot table , updated models appropriately: updated models

now have problem accessing pivot element. if try this... display custom pivot element ... doesn't display anything! no error no value.

looking command... display pivot data

... accessable in pivot element:

enter image description here

as can see, part_sure element not there.

my user model: enter image description here

my event model:

enter image description here

i don't know why isn't working. tried google hour. happy if give me hint!

you're calling events method user model, aren't showing user model.

what user model like? did event model, need specify pivot column in user model.

user model

public function events() {     return $this->belongstomany('radclub\event')->withpivot('part_sure'); } 

you may need edit radclub\event proper namespace.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -