* добавил окно для редактирования выдачи / возврата карты * раздробил логику хранения карты
31 lines
562 B
PHP
31 lines
562 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ArchiveHistory extends Model
|
|
{
|
|
protected $fillable = [
|
|
'historyable_type',
|
|
'historyable_id',
|
|
'issue_at',
|
|
'return_at',
|
|
'comment',
|
|
'org_id',
|
|
'employee_name',
|
|
'employee_post',
|
|
'has_lost',
|
|
];
|
|
|
|
public function historyable()
|
|
{
|
|
return $this->morphTo();
|
|
}
|
|
|
|
public function org(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
{
|
|
return $this->belongsTo(Org::class);
|
|
}
|
|
}
|