1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-18 23:42:25 +02:00
invoiceninja/app/Models/GatewayType.php
2019-01-30 22:25:37 +11:00

37 lines
576 B
PHP

<?php
namespace App\Models;
use Cache;
use Eloquent;
use Utils;
/**
* Class GatewayType.
*/
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;
}
}