create map for rahdari point

This commit is contained in:
2025-04-14 10:47:11 +03:30
parent 822730afb1
commit b25ce4bfe2
4 changed files with 40 additions and 17 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphTo;
class PointFile extends Model
{
@@ -25,13 +26,15 @@ class PointFile extends Model
* @var array
*/
protected $fillable = [
'path'
'path',
'point_fileable_id',
'point_fileable_type',
];
/**
* Get the owning point_fileable model.
*/
public function point_fileable()
public function point_fileable(): MorphTo
{
return $this->morphTo();
}