123456789101112131415161718192021222324 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\SoftDeletes;
- use Packages\Product\Models\Product;
- class Upload extends Model
- {
- use SoftDeletes;
- // protected $fillable = ['name', 'path', 'mime_type', 'extension', 'uploadable_type', 'uploadable_id'];
- protected $guarded = [] ;
- public function uploadable()
- {
- return $this->morphTo();
- }
- public function draft()
- {
- return $this->morphOne(Draft::class, 'draftable');
- }
- }
|