SHARE
TWEET

Untitled

a guest Jun 18th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top