Upload.php 462 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. class Upload extends Model
  6. {
  7. #use SoftDeletes;
  8. /**
  9. * The attributes that are mass assignable.
  10. *
  11. * @var array
  12. */
  13. protected $fillable = [
  14. 'file_original_name', 'file_name', 'user_id', 'extension', 'type', 'file_size',
  15. ];
  16. public function user()
  17. {
  18. return $this->belongsTo(User::class);
  19. }
  20. }