Skip to content

Commit

Permalink
LP-139 CurrencyRate crud stub added
Browse files Browse the repository at this point in the history
  • Loading branch information
hafijul233 committed Nov 20, 2023
1 parent 4a3a869 commit 6f26639
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/Traits/MetaDataRelations.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,43 @@
namespace Fintech\Auth\Traits;

use Fintech\Core\Facades\Core;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

if (Core::packageExists('MetaData')) {
trait MetaDataRelations
{
/**
* Permanent Address
*/
public function country()
public function country(): BelongsTo
{
return $this->belongsTo(config('fintech.metadata.country_model'));
}

public function state()
public function state(): BelongsTo
{
return $this->belongsTo(config('fintech.metadata.state_model'));
}

public function city()
public function city(): BelongsTo
{
return $this->belongsTo(config('fintech.metadata.city_model'));
}

/**
* Present Address
*/
public function presentCountry()
public function presentCountry(): BelongsTo
{
return $this->belongsTo(config('fintech.metadata.country_model'), 'present_country_id');
}

public function presentState()
public function presentState(): BelongsTo
{
return $this->belongsTo(config('fintech.metadata.state_model'), 'present_state_id');
}

public function presentCity()
public function presentCity(): BelongsTo
{
return $this->belongsTo(config('fintech.metadata.city_model'), 'present_city_id');
}
Expand Down

0 comments on commit 6f26639

Please sign in to comment.