File: /var/www/ipsremont-demo/app/Models/DeviceParts.php
<?php
namespace App\Models;
/**
* @property int $id
* @property int $device_id
* @property int $part_id
* @property string $label
* @property int $amount
* @property string $deleted_at
* @property string $created_at
* @property string $updated_at
*/
class DeviceParts extends BaseModel
{
protected $table = 'device_parts';
public $incrementing = false;
protected $fillable = [
'devices_id',
'part_id',
'label',
'amount',
];
public function label(): string
{
return ($this->label) ? '№ ' . $this->label . ' ' . __('parts.in_schema') : __('parts.without_number');
}
}