invoiceninja/app/Models/GatewayType.php

37 lines
576 B
PHP
Raw Normal View History

2017-01-30 21:40:43 +02:00
<?php
namespace App\Models;
2016-09-15 13:41:09 +03:00
use Cache;
2017-01-30 21:40:43 +02:00
use Eloquent;
2016-09-15 13:41:09 +03:00
use Utils;
/**
2017-01-30 21:40:43 +02:00
* Class GatewayType.
2016-09-15 13:41:09 +03:00
*/
class GatewayType extends Eloquent
{
/**
* @var bool
*/
public $timestamps = false;
/**
* @return mixed
*/
public function getName()
{
return $this->name;
}
public static function getAliasFromId($id)
{
return Utils::getFromCache($id, 'gatewayTypes')->alias;
}
public static function getIdFromAlias($alias)
{
return Cache::get('gatewayTypes')->where('alias', $alias)->first()->id;
}
}