ldc-legaulois/app/Models/SellItem.php

22 lines
443 B
PHP
Raw Normal View History

2021-03-04 09:38:39 +01:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class SellItem extends Model
{
2021-03-21 22:51:19 +01:00
// phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
2021-03-04 09:38:39 +01:00
public function getHtmlNameAttribute($value)
{
return nl2br(strip_tags($this->name));
}
public function toArray()
{
return array_merge(parent::toArray(), [
'htmlName' => $this->htmlName
]);
}
}