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.
25 lines
406 B
25 lines
406 B
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Upload extends Model
|
|
{
|
|
|
|
protected $fillable = ['user_id', 'path', 'file_role', 'uploadable_type'];
|
|
/**
|
|
* Get all of the owning commentable models.
|
|
*/
|
|
public function uploadable()
|
|
{
|
|
return $this->morphTo();
|
|
}
|
|
|
|
public function creator ()
|
|
{
|
|
return $this->belongsTo('App\User');
|
|
}
|
|
|
|
}
|