mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-11-04 06:23:17 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			420 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			420 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
namespace Crater;
 | 
						|
 | 
						|
use Illuminate\Database\Eloquent\Model;
 | 
						|
use Crater\City;
 | 
						|
use Crater\Country;
 | 
						|
use Crater\Address;
 | 
						|
 | 
						|
class State extends Model
 | 
						|
{
 | 
						|
    public function cities()
 | 
						|
    {
 | 
						|
        return $this->hasMany(City::class);
 | 
						|
    }
 | 
						|
 | 
						|
    public function country()
 | 
						|
    {
 | 
						|
        return $this->belongsTo(Country::class);
 | 
						|
    }
 | 
						|
 | 
						|
    public function address()
 | 
						|
    {
 | 
						|
        return $this->hasMany(Address::class);
 | 
						|
    }
 | 
						|
}
 |