1
0

AccountInterstitial.php 525 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. class AccountInterstitial extends Model
  5. {
  6. /**
  7. * The attributes that should be mutated to dates.
  8. *
  9. * @var array
  10. */
  11. protected $dates = ['read_at', 'appeal_requested_at'];
  12. public const JSON_MESSAGE = 'Please use web browser to proceed.';
  13. public function user()
  14. {
  15. return $this->belongsTo(User::class);
  16. }
  17. public function status()
  18. {
  19. if($this->item_type != 'App\Status') {
  20. return;
  21. }
  22. return $this->hasOne(Status::class, 'id', 'item_id');
  23. }
  24. }