clrghouz/app/Models/Software.php
2021-06-29 20:45:57 +10:00

28 lines
408 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Traits\ScopeActive;
class Software extends Model
{
use ScopeActive;
public const SOFTWARE_MAILER = 0x01;
public const SOFTWARE_TOSSER = 0x02;
/* ATTRIBUTES */
public function getCodeAttribute($value)
{
return sprintf('%04X',$value);
}
public function getNameAttribute($value)
{
return $value ?: 'Unknown';
}
}