Address.php 506 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Address extends Model
  5. {
  6. protected $fillable = ['set_default'];
  7. public function user()
  8. {
  9. return $this->belongsTo(User::class);
  10. }
  11. public function country()
  12. {
  13. return $this->belongsTo(Country::class);
  14. }
  15. public function state()
  16. {
  17. return $this->belongsTo(State::class);
  18. }
  19. public function city()
  20. {
  21. return $this->belongsTo(City::class);
  22. }
  23. }