Upload.php 419 B

12345678910111213141516171819
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. use Packages\Product\Models\Product;
  6. class Upload extends Model
  7. {
  8. use SoftDeletes;
  9. // protected $fillable = ['name', 'path', 'mime_type', 'extension', 'uploadable_type', 'uploadable_id'];
  10. protected $guarded = [] ;
  11. public function uploadable()
  12. {
  13. return $this->morphTo();
  14. }
  15. }