У меня есть эта функция, но я не могу объявить генерацию в pdf
Как мне сгенерировать PDF и отправить электронное письмо в PDF?
Я отправил электронное письмо, но одно отправлено в формате html.
public function store_banegosiasi(request $request,$id){
if(!Session::get('login')){
return redirect('/login')->with('alert','Kamu harus login dulu');
}
else{
$idp = $request->id_penyedia;
$sesi = Session::get('id');
DB::table('tbl_paket_pl')
->where('id_paket_pl',$id)
->update(['status_undangan_pl' => $request->status_undangan_pl]);
$data = new ModelUndanganpl();
$data->id_paket_pl = $request->input('id_paket_pl');
$data->hari_pl = $request->input('hari_pl');
$data->tanggal_pl = $request->input('tanggal_pl');
$data->bulan_pl = $request->input('bulan_pl');
$data->tahun_pl = $request->input('tahun_pl');
$data->sph_pl = $request->input('sph_pl');
$data->negosiasi_teknis_pl = $request->input('negosiasi_teknis_pl');
$data->save();
$nama = DB::table('tbl_profile_penyedia')->where('id_profil_penyedia', $idp)->pluck('nama');
$namapp = DB::table('users')->where('id',$sesi)->pluck('name');
$hari = $request->hari_pl;
$idundangan = DB::table('tbl_undangan_pl')->pluck('id_undangan_pl');
$sph = $request->sph_pl;
$nt = $request->negosiasi_teknis_pl;
$pl = DB::table('tbl_paket_pl')->where('id_paket_pl',$id)->pluck('nama_pesanan_pl');
$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();
$email = DB::table('tbl_profile_penyedia')
->where('id_profil_penyedia', $idp)
->pluck('email');
$tanggalh = $request->tanggal_pl;
$bulanh = $request->bulan_pl;
$tahunh = $request->tahun_pl;
Mail::to($email)->send(new BANegosiasiMail($nama,$namapp,$hari,$idundangan,$sph,$nt,$pl,$pesanan,$tanggalh,$bulanh,$tahunh));
return redirect('pesanan')->with('success','Berhasil Dikirim!');
}
}
Я перепробовал все виды вещей, но это не сработало, вы можете мне помочь
Вы можете помочь мне сделать это, пожалуйста помоги мне