mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-04 22:14:35 -04:00
35 lines
574 B
PHP
35 lines
574 B
PHP
<?php namespace App\Models;
|
|
|
|
use Eloquent;
|
|
use Cache;
|
|
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;
|
|
}
|
|
}
|