Mention.php 575 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. class Mention extends Model
  6. {
  7. use SoftDeletes;
  8. /**
  9. * The attributes that should be mutated to dates.
  10. *
  11. * @var array
  12. */
  13. protected $casts = [
  14. 'deleted_at' => 'datetime'
  15. ];
  16. protected $guarded = [];
  17. public function profile()
  18. {
  19. return $this->belongsTo(Profile::class, 'profile_id', 'id');
  20. }
  21. public function status()
  22. {
  23. return $this->belongsTo(Status::class, 'status_id', 'id');
  24. }
  25. }