belongsTo(Company::class, 'companyid'); } public function job() { return $this->belongsTo(Jobs::class, 'jobid'); } public function getDeadLineAttribute() { return date('Y-m-d', $this->starttime)."~".date('Y-m-d', $this->endtime); } public static function get($where) { if (Promotion::where($where)->first()) { return true; } return false; } }