Review.php 578 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  5. class Review extends Model
  6. {
  7. protected $fillable = [
  8. 'user_id',
  9. 'application_id',
  10. 'review_text'
  11. ];
  12. /**
  13. * The attributes that should be hidden for serialization.
  14. *
  15. * @var list<string>
  16. */
  17. public function user(): BelongsTo
  18. {
  19. return $this->belongsTo(User::class);
  20. }
  21. public function application(): BelongsTo
  22. {
  23. return $this->belongsTo(Application::class);
  24. }
  25. }