Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. id
  2. id_supplier
  3. id_store
  4.  
  5. id
  6.  
  7. id
  8.  
  9. public function supplier() {
  10. return $this->belongsTo('AppSupplier', 'id_supplier');
  11. }
  12.  
  13. public function repairs() {
  14. return $this->hasMany('AppRepair', 'id_supplier');
  15. }
  16.  
  17. public function repairs() {
  18. return $this->hasMany('AppRepair', 'id_store');
  19. }
  20.  
  21. public function suppliers() {
  22. return $this->hasManyThrough('AppSupplier', 'AppRepair', 'id_supplier', '<NO IDEIA WHAT'S HERE>');
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement