You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
397 B

<?php
namespace App\Entities\Projects;
use Illuminate\Database\Eloquent\Model;
class File extends Model
{
protected $fillable = ['fileable_id', 'fileable_type', 'type_id', 'filename', 'title', 'description'];
public function fileable()
{
return $this->morphTo();
}
public function project()
{
return $this->morphTo('fileable', Project::class);
}
}