lundi 1 avril 2019

how to add join in method crudbooster

i have method code :

public function getAddProfil($id){
      //Create an Auth
      if(!CRUDBooster::isCreate() && $this->global_privilege==FALSE || $this->button_add==FALSE) {    
        CRUDBooster::redirect(CRUDBooster::adminPath(),trans("crudbooster.denied_access"));
      }

          $data = [];
          $data['page_title'] = 'Add Data Profil';
          $data['result'] = DB::table('cms_users')->orderby('id','desc')->where('id','=',$id)->get();

          //Please use cbView method instead view method from laravel
          $this->cbView('profil_add',$data);
}

any suggest how to add join in :

$data['result'] = DB::table('cms_users')->orderby('id','desc')->where('id','=',$id)->get();

i have tried adding join :

$data['result'] = DB::table('cms_users')->join('profil')->orderby('id','desc')->where('id','=',$id)->get();

and then i got error in the crudbooster



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Vf6igE
via IFTTT

Aucun commentaire:

Enregistrer un commentaire