Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. id (ai)
  2.  
  3. id (ai)
  4. owner = user.id
  5.  
  6. id (ai)
  7. owner_id = bulletins.owner
  8. bulletin_id = bulletins.id // this I can't get user ID - don't know how.
  9.  
  10. public function bulletin()
  11. {
  12. return $this->belongsTo('AppBulletins','bulletin_id');
  13. }
  14.  
  15. public function users()
  16. {
  17. return $this->belongsTo('AppUser','owner_id');
  18. }
  19.  
  20. owner_id = user.id and bulletin_id->owner = user.id
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement