Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. public function countryInverso(){
  2. return $this->belongsTo(Country::class);
  3. }
  4.  
  5. public function umPraUmReverso(){
  6. $location = Location::where('latitude', 54)->get()->first();
  7. $country = $location->countryInverso;
  8. dd($country);
  9.  
  10.  
  11. }
  12.  
  13. public function country(){
  14. return $this->belongsTo(Country::class);
  15. }
  16.  
  17. public function umPraUmReverso(){
  18. $location = Location::where('latitude', 54)->get()->first();
  19. $country = $location->country;
  20. dd($country);
  21.  
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement