clrghouz/app/Models/Software.php

28 lines
408 B
PHP
Raw Normal View History

2021-05-13 12:40:21 +00:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
2021-06-29 10:43:29 +00:00
use App\Traits\ScopeActive;
2021-05-13 12:40:21 +00:00
class Software extends Model
{
2021-06-29 10:43:29 +00:00
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';
}
2021-05-13 12:40:21 +00:00
}