21 lines
443 B
PHP
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
|
|
]);
|
|
}
|
|
}
|