Avatar.php 613 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. class Avatar extends Model
  6. {
  7. use SoftDeletes;
  8. /**
  9. * The attributes that should be mutated to dates.
  10. *
  11. * @var array
  12. */
  13. protected $dates = [
  14. 'deleted_at',
  15. 'last_fetched_at',
  16. 'last_processed_at'
  17. ];
  18. protected $fillable = ['profile_id'];
  19. protected $visible = [
  20. 'id',
  21. 'profile_id',
  22. 'media_path',
  23. 'size',
  24. ];
  25. public function profile()
  26. {
  27. return $this->belongsTo(Profile::class);
  28. }
  29. }