php - Call to undefined method Illuminate\Database\Query\Builder::with() -




i need update current code using with() function. before use db::raw (i use model style) with() not have problems. however, when use db::raw() with() can not use anymore. how make query can use with() function?

thanks.

$question_list = db::connection('mysql_pencil_content')             ->table('cms_qst_master_main mst')             ->select(db::raw(                 'mst.*',                 'mst.question_id',                 'mst.dt_added dt_created',                 'mst.scode_id subject_code_id',                 'mst.first_dataentry_id owner_user_id',                 'mst.format_type_id qst_format_id',                 'mst.publish_status published_status',                 'mst.edu_level_id edulevel_id',                 'mst.edu_year_id eduyear_id',                 '8 owner_user_type',                 'mst.dt_update',                 'chp.chapter_name',                 'mst.subject_id',                 'mst.chapter_id',                 'sub.subject_name',                 'sub.short_name',                 'mst.flow_status',                 '"cms" derived_from',                 '0 v1_story_id',                 '0 v1_remark',                 '0 review_by',                 '"reviewed" review_status',                 '0 updated_by'))             ->leftjoin('cms_edu_subject_chapter chp','chp.chapter_id','=','mst.chapter_id')             ->leftjoin('cms_edu_subject_code sub','sub.scode_id','=','mst.scode_id')             ->with(['cmsedusubjectchapter','cmsedusubjectlevel'])             ->where('mst.published_status',question_status_published)             ->wherein('mst.question_id',$arguments['question_ids'])             ->inrandomorder()             ->orderby('mst.question_id')             ->get()             ->toarray(); 





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -