MeetingParticipant.php 506 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class MeetingParticipant extends Model
  5. {
  6. protected $table = "meeting_participant";
  7. public function proName() {
  8. if($this->guest_or_pro === 'PRO' && $this->pro_id) {
  9. $pro = Pro::find($this->pro_id);
  10. if($pro) {
  11. return $pro->name_display;
  12. }
  13. }
  14. return '';
  15. }
  16. public function meeting()
  17. {
  18. return $this->belongsTo(Meeting::class);
  19. }
  20. }