введите описание изображения здесь
как извлечь данные id = 6 в tbl_direksi_perusahaan?
как насчет записи на контроллер laravel?
У меня есть tbl_paket_pl, и у меня есть отношение id_profil_penyedia = 6, id_profil_pedia в качестве первичного ключа, связанного с tbl_direksi_perusahaan, как мне получить данные tbl_direksi_company
public function lays_suratpesanan($id)
{
if(!Session::get('login')){
return redirect('/login')->with('alert','Kamu harus login dulu');
}
else{
$sesi = Session::get('id');
$paket = DB::table('tbl_paket_pl as a')
->select('*')
->join('tbl_profile_penyedia as b', 'a.id_profil_penyedia', '=', 'b.id_profil_penyedia')
->join('tbl_kriteria as d', 'a.id_kriteria', '=', 'd.id_kriteria')
->join('tbl_pagu as e', 'a.id_pagu', '=', 'e.id_pagu')
->join('tbl_pembayaran as f', 'a.id_pembayaran', '=', 'f.id_pembayaran')
->join('users as g', 'a.id_userpp', '=', 'g.id')
->join('tbl_jenis_penyedia as h', 'b.id_jenis_penyedia', '=', 'h.id_jenis_penyedia')
->join('tbl_cabang_ut as i', 'b.id_cabang_ut', '=', 'i.id_cabang')
->where('id_paket_pl',$id)
->get();
$profilp = DB::table('tbl_profile_penyedia as a')
->select('*')
->where('a.id_profil_penyedia',$id)
->get();
$direksi = DB::table('tbl_direksi_perusahaan as a')
->select('*')
->join('tbl_profile_penyedia as b', 'a.id_profil_penyedia', '=', 'b.id_profil_penyedia')
->where('a.id_profil_penyedia', $id)
->get();
$pesanan = DB::table('tbl_pesanan_pl as a')
->select('*')
->join('tbl_bmn2 as b', 'a.kode_bmn', '=', 'b.kode_bmn')
->join('tbl_paket_pl as c', 'a.id_paket_pl', '=', 'c.id_paket_pl')
->join('tbl_profile_penyedia as d', 'c.id_profil_penyedia', '=', 'd.id_profil_penyedia')
->join('users as e', 'd.id_user', '=', 'e.id')
->join('tbl_kriteria as f', 'c.id_kriteria', '=', 'f.id_kriteria')
->join('tbl_paket as g', 'd.id_paket', '=', 'g.id_paket')
->join('tbl_pagu as h', 'c.id_pagu', '=', 'h.id_pagu')
->join('tbl_pembayaran as i', 'c.id_pembayaran', '=', 'i.id_pembayaran')
->join('tbl_ruang2 as j', 'a.kode_unit', '=', 'j.kode_ruang')
->join('tbl_jenis_penyedia as k', 'd.id_jenis_penyedia', '=', 'k.id_jenis_penyedia')
->join('tbl_kategori_belanja as m', 'g.id_kategori_belanja', '=', 'm.id_kategori_belanja')
->join('tbl_cabang_ut as l', 'd.id_cabang_ut', '=', 'l.id_cabang')
->where('a.id_paket_pl',$id)
->get();
$undanganpl = DB::table('tbl_undangan_pl as a')
->select('*')
->join('tbl_paket_pl as b', 'a.id_paket_pl', '=', 'b.id_paket_pl')
->where('a.id_paket_pl', $id)
->get();
$suratpesanan = DB::table('tbl_suratpesanan_pl as a')
->select('*')
->join('tbl_paket_pl as b', 'a.id_paket_pl', '=', 'b.id_paket_pl')
->where('a.id_paket_pl', $id)
->get();
return view('pembelian_langsung/undangan/lays_suratpesanan', compact('sesi','paket','profilp','pesanan','undanganpl','suratpesanan','direksi'));
// $pdf = PDF::loadView('pembelian_langsung/undangan/lays_suratpesanan', compact('sesi','paket','profilp','pesanan','undanganpl','bmn2','kategorib','pagu','pembayaran','kriteria','kodeu'));
// return $pdf->download('Berita Acara Negosiasi.pdf');
}
}
вы можете помочь мне решить это