<?php namespace App;

use Illuminate\Database\Eloquent\Model;

class Recruitment extends Model {

	/**
	 * The database table used by the model.
	 *
	 * @var string
	 */
	protected $table = 'recruitment';

	/**
	 * The attributes that are mass assignable.
	 *
	 * @var array
	 */
	protected $fillable = ['sender_profile_id','receiver_profile_id','job_id','title','msg_content'];
       
          protected function getrecruit($profile_id)
	{
                $result = $this->select('recruitment.title','job_specifications.title as job_title','recruitment.id','recruitment.sender_profile_id','recruitment.receiver_profile_id','recruitment.job_id','recruitment.created_at','recruitment.updated_at')
                                ->join('job_specifications', 'recruitment.job_id', '=', 'job_specifications.id')
                                ->where('sender_profile_id','=',$profile_id);
		return $result;
	}
        
}
