Files
UNIT3D-Community-Edition/app/Models/TicketAttachment.php
HDVinnie 472c820f99 update: UNIT3D linting
- github action updated with new ruleset in pint.json
- codebase linted with new ruleset
- contributors can now run `./vendor/bin/pint`
- action workflow will auto correct any lint issues upon commit/opened pull request
2023-02-02 08:02:34 -05:00

39 lines
778 B
PHP

<?php
namespace App\Models;
use App\Traits\Auditable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class TicketAttachment extends Model
{
use Auditable;
use HasFactory;
protected $appends = [
'full_disk_path',
];
public function getFullDiskPathAttribute(): string
{
return $this->disk_path.''.$this->file_name;
}
/**
* Belongs To A User.
*/
public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(User::class);
}
/**
* Belongs To A Ticket.
*/
public function ticket(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(Ticket::class);
}
}