I have user and job model. their is many to many relation between them. Name of Pivot table in job_user. I want to store records in pivot table with job Type and job Title from Job table and user Name from user table. how will i store that?Here is relation between job and user.
Job Model
public function Job_User()
{
return $this->belongs To Many('App\Http\Models\User', 'jobs_users', 'user_id', 'job_id')->with-pivot('user Name','job Type','job Title');;
}
My user Model
public function Job_User()
{
return $this->belongs To Many('App\HTTP\Models\Job', 'jobs_users', 'user_id', 'job_id')->with Pivot('user Name','job Type','job Title');
}