- clean files after one month - Dispatch emails as database jobs (retry on fail) - add command to trigger cleanup of old xml files
47 lines
1.2 KiB
PHP
47 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
*
|
|
* @property integer $id
|
|
* @property string $name
|
|
* @property float $price
|
|
* @property string $picture
|
|
* @property string $picture_r
|
|
* @property integer $archadia_id
|
|
* @property integer $archadia_weight
|
|
* @property \Carbon\Carbon $created_at
|
|
* @property \Carbon\Carbon $updated_at
|
|
*
|
|
* @package App\Models
|
|
*/
|
|
class SellItem extends Model
|
|
{
|
|
/**
|
|
* Getter html_name
|
|
*
|
|
* @param mixed $value
|
|
* @return string
|
|
* @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
|
|
*/
|
|
public function getHtmlNameAttribute($value): string
|
|
{
|
|
// phpcs:enable
|
|
return nl2br(strip_tags($this->name));
|
|
}
|
|
|
|
/**
|
|
* Convert the model instance to an array.
|
|
*
|
|
* @return array<string,string|integer|float|array<string,integer>>
|
|
*/
|
|
public function toArray()
|
|
{
|
|
return array_merge(parent::toArray(), [
|
|
'htmlName' => $this->htmlName
|
|
]);
|
|
}
|
|
}
|