mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 03:01:08 +03:30
23 lines
396 B
PHP
23 lines
396 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Media extends Model
|
|
{
|
|
|
|
protected $fillable = ['model_id', 'model_type', 'user_id', 'batch_id', 'path', 'file_name', 'file_type'];
|
|
public $timestamps = true;
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo('App\User');
|
|
}
|
|
public function model()
|
|
{
|
|
return $this->morphTo();
|
|
}
|
|
|
|
}
|