????

Your IP : 18.216.45.231


Current Path : /home/thenclexdoctor.com/public_html/app/Models/
Upload File :
Current File : /home/thenclexdoctor.com/public_html/app/Models/CourseNoticeboard.php

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CourseNoticeboard extends Model
{
    protected $table = 'course_noticeboards';
    public $timestamps = false;
    protected $dateFormat = 'U';
    protected $guarded = ['id'];

    static $colors = ['warning', 'danger', 'neutral', 'info', 'success'];

    public function webinar()
    {
        return $this->belongsTo('App\Models\Webinar', 'webinar_id', 'id');
    }

    public function creator()
    {
        return $this->belongsTo('App\User', 'creator_id', 'id');
    }

    public function noticeboardStatus()
    {
        return $this->hasOne('App\Models\CourseNoticeboardStatus', 'noticeboard_id', 'id');
    }

    public function getIcon()
    {
        $icons = [
            'warning' => 'alert-triangle',
            'danger' => 'alert-octagon',
            'neutral' => 'shield',
            'info' => 'message-square',
            'success' => 'check-circle'
        ];

        return $icons[$this->color];
    }
}

Page not found | The NCLEX Doctor

Page not found!

Sorry, this page is not available...