osb/app/Models/Country.php

32 lines
477 B
PHP
Raw Permalink Normal View History

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Country extends Model
{
2018-05-20 12:53:14 +00:00
protected $table = 'ab_country';
public $timestamps = FALSE;
/**
* The currency this country belongs to
*/
public function currency()
{
2018-05-20 12:53:14 +00:00
return $this->belongsTo(Currency::class);
}
public function taxes()
{
return $this->hasMany(Tax::class);
}
/**
* The accounts in this country
*/
public function users()
{
2021-06-29 03:18:52 +00:00
return $this->hasMany(User::class);
}
}