export to pdf

simulasi keseluruhan
notis lelong
This commit is contained in:
Amirah22
2022-01-26 14:46:24 +08:00
parent 15c4c79945
commit eefc3e803a
8 changed files with 653 additions and 129 deletions
+13
View File
@@ -26,6 +26,7 @@ use App\Models\LelongBid;
use App\Models\LelongBidMarhun;
use App\Models\LelKarat;
use App\Models\LelKarat_temp;
use Carbon\Carbon;
class LelongController extends Controller
{
@@ -321,6 +322,18 @@ class LelongController extends Controller
->with('success','Create Lelong Berjaya');
}
public function exportnotis($id)
{
$currentdate = Carbon::now();
$currentdate = $currentdate->toDateString();
$lelong = Lelong::where('id','=',$id)->first();
$lelongbid = LelongBid::where('lelong_id','=',$lelong->id)->get();
// return view('pdf.notislelong',compact('currentdate','lelongbid')); //page for editing
$pdf = PDF::loadView('pdf.notislelong',compact('currentdate','lelongbid'));
return $pdf->download('Notis Lelong.pdf');
}
public function delete($id)
{