Files
backend/app/Models/PointFile.php

42 lines
761 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphTo;
class PointFile extends Model
{
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'id',
'point_fileable_id',
'point_fileable_type',
'created_at',
'updated_at'
];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'path',
'point_fileable_id',
'point_fileable_type',
];
/**
* Get the owning point_fileable model.
*/
public function point_fileable(): MorphTo
{
return $this->morphTo();
}
}