ldc-legaulois/app/Models/SellItem.php
2021-03-21 22:51:19 +01:00

21 lines
443 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class SellItem extends Model
{
// phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
public function getHtmlNameAttribute($value)
{
return nl2br(strip_tags($this->name));
}
public function toArray()
{
return array_merge(parent::toArray(), [
'htmlName' => $this->htmlName
]);
}
}