当前位置: 首页>>代码示例>>PHP>>正文


PHP PDF::loadView方法代码示例

本文整理汇总了PHP中PDF::loadView方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF::loadView方法的具体用法?PHP PDF::loadView怎么用?PHP PDF::loadView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PDF的用法示例。


在下文中一共展示了PDF::loadView方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: generatePDF

 public function generatePDF()
 {
     $params = array("email" => Input::get('email'), "id" => Input::get('id'));
     $coupon = $this->generateCoupon($params);
     $pdf = PDF::loadView("coupon_pdf", compact('coupon'));
     return $pdf->download('coupon.pdf');
 }
开发者ID:kedarv,项目名称:McAttack,代码行数:7,代码来源:PageController.php

示例2: postAction

 /**
  *  This function responses  to the 
  *  post request of the /member/action
  *  then checked which button are pressed in the
  *  form of member dashboard page of the 
  *  route /member
  */
 public function postAction()
 {
     // Holding checked row value from movie table
     if (Input::get('checked')) {
         $id = Input::get('checked');
     } elseif (Input::get('checked1')) {
         $id = Input::get('checked1');
     }
     /**
      *  Redirected route if Details button is pressed
      */
     if (Input::has('Details')) {
         return Redirect::route('member-movie-details-get', $id);
     }
     /**
      *  Redirected route if Print button is pressed
      */
     if (Input::has('Print')) {
         $parameterr = array();
         $parameter['title'] = ucwords(Session::get('username')) . "'s Order";
         $parameter['orders'] = Order::where('member_id', '=', Session::get('member_id'))->orderBy('id', 'desc')->get();
         $pdf = PDF::loadView('reports.order.getAllOrders', $parameter)->setPaper('a4')->setOrientation(config::$MEMBER_REPORT_ORIENTATION)->setWarnings(false);
         return $pdf->download('orders.pdf');
     }
 }
开发者ID:madiarsa,项目名称:DVD-Rental,代码行数:32,代码来源:MemberHomeController.php

示例3: balanceSheet

 public static function balanceSheet($date)
 {
     $accounts = Account::all();
     $organization = Organization::find(1);
     $pdf = PDF::loadView('pdf.financials.balancesheet', compact('accounts', 'date', 'organization'))->setPaper('a4')->setOrientation('potrait');
     return $pdf->stream('Balance Sheet.pdf');
 }
开发者ID:kenkode,项目名称:xaraerp,代码行数:7,代码来源:Account.php

示例4: exportToPdf

 public function exportToPdf()
 {
     $data = DB::table('logbooks')->join('priorities', 'logbooks.priorities_id', '=', 'priorities.id')->join('users', 'logbooks.user_id', '=', 'users.id');
     $fromDate = Input::get('fromDate');
     $toDate = Input::get('toDate');
     $sid = Input::get('sid');
     $oid = Input::get('oid');
     if ($oid == 'all') {
         $opName = "Semua Operator";
     } else {
         if ($oid) {
             $user = User::find($oid);
             $opName = $user->first_name . ' ' . $user->last_name;
             $data->where('logbooks.user_id', '=', $oid);
         }
     }
     if ($sid == 'all') {
         $sName = "Semua Status";
     } else {
         if ($sid) {
             $status = Priorities::find($sid);
             $sName = $status->description;
             $data->where('logbooks.priorities_id', '=', $sid);
         }
     }
     $query = $data->select('logbooks.user_id', 'users.id', 'logbooks.created_at', 'logbooks.title', 'logbooks.deskripsi', 'logbooks.priorities_id', 'priorities.description as priority', 'users.first_name', 'users.last_name')->whereBetween('logbooks.created_at', array($fromDate, $toDate))->orderBy('logbooks.created_at', 'asc');
     $logbook = ['data' => $query->get(), 'fromDate' => $fromDate, 'toDate' => $toDate, 'sName' => $sName, 'opName' => $opName, 'count' => $data->count()];
     // $pdf = View::make('export.pdf', $logbook);
     // return $pdf;
     $pdf = PDF::loadView('export.pdf', $logbook);
     return $pdf->stream();
 }
开发者ID:antoniosai,项目名称:daily-activity-management,代码行数:32,代码来源:ExportController.php

示例5: stock

 public function stock()
 {
     $items = Item::all();
     $organization = Organization::find(1);
     $pdf = PDF::loadView('erpreports.stockReport', compact('items', 'organization'))->setPaper('a4')->setOrientation('potrait');
     return $pdf->stream('Stock Report.pdf');
 }
开发者ID:arapmelly,项目名称:xaraerp,代码行数:7,代码来源:ErpReportsController.php

示例6: verCurriculo

 public function verCurriculo($id)
 {
     //$resultado="";
     //$userId=\App\Estudante::find($id)->user_id;
     $userId = Auth::user()->estudante->user_id;
     //$estudante=Estudante::all()->where("user_id",$userId);
     //if()
     if ($id == $userId) {
         // echo $id;
         // echo $userId;
         $resultado = User::with(['endereco', 'contacto', 'estudante', 'estudante.curriculo', 'estudante.curriculo.disponibilidade', 'estudante.curriculo.OutraQualificacao', 'estudante.curriculo.referencia', 'estudante.curriculo.HabilitacaoIntelectual', 'estudante.curriculo.habilitacao', 'estudante.curriculo.experiencia', 'estudante.curriculo.Idioma'])->where('id', $userId)->first();
         $parameter = array();
         $parameter['resultado'] = $resultado;
         /* $html=View::make('ApreciarPerfil')->withData($parameter);
                $dompdf=new \DOMPDF();
                $dompdf->set_base_path(public_path().'/Start/css/MeuStyle');//use style exterior
                $dompdf->load_html($html);
                $dompdf->render();
               $dompdf->stream("cv.pdf");
            }*/
         $pdf = \PDF::loadView('ApreciarPerfil', $parameter);
         return $pdf->stream('Curriculum.pdf');
     } else {
         return "nao foi encontrado";
     }
 }
开发者ID:uemCvs,项目名称:CV,代码行数:26,代码来源:ApreciarPerfilController.php

示例7: transacciones

 public function transacciones()
 {
     $idUser = \Auth::user()->id;
     $cajero = $this->cajero->findByField('idUsuario', $idUser);
     $data = $this->repo->findByField2('id_cajero', $cajero->id);
     return \PDF::loadView('pdf.reporte', compact('data'))->download('reporte_transacciones.pdf');
 }
开发者ID:Burris19,项目名称:CreditosZacapaCliente,代码行数:7,代码来源:PdfController.php

示例8: getResult

 public function getResult($id = 'x')
 {
     $printed = \Request::get('printed');
     $slctd_samples = \Request::has("samples") ? \Request::get("samples") : [];
     $slctd_samples_str = is_array($slctd_samples) ? implode(',', $slctd_samples) : "{$slctd_samples}";
     $sql = "SELECT  s.*, p.artNumber,p.otherID, p.gender, p.dateOfBirth,\n\t\t\t\tGROUP_CONCAT(ph.phone SEPARATOR ',') AS phone, f.facility, d.district, h.hub AS hub_name, \n\t\t\t\tGROUP_CONCAT(res_r.Result, '|||', res_r.created SEPARATOR '::') AS roche_result,\n\t\t\t\tGROUP_CONCAT(res_a.result, '|||', res_a.created SEPARATOR '::') AS abbott_result,\n\t\t\t\tGROUP_CONCAT(res_o.result, '|||', res_o.created SEPARATOR '::') AS override_result,\n\t\t\t\tlog_s.id AS repeated, v.outcome AS verify_outcome, reason.appendix AS rejection_reason,\n\t\t\t\tu.signaturePATH, wk.machineType, fctr.factor, sw.sampleID, sw.worksheetID\n\t\t\t\tFROM vl_samples AS s\n\t\t\t\tLEFT JOIN vl_facilities AS f ON s.facilityID=f.id\n\t\t\t\tLEFT JOIN vl_districts AS d ON f.districtID=d.id\n\t\t\t\tLEFT JOIN vl_hubs AS h ON f.hubID=h.id\n\t\t\t\tLEFT JOIN vl_patients As p ON s.patientID=p.id\n\t\t\t\tLEFT JOIN vl_patients_phone As ph ON p.id = ph.patientID\n\t\t\t\tLEFT JOIN vl_samples_verify AS v ON s.id=v.sampleID\t\t\t\t\n\t\t\t\tLEFT JOIN vl_appendix_samplerejectionreason AS reason ON v.outcomeReasonsID=reason.id\n\t\t\t\tLEFT JOIN vl_samples_worksheet AS sw ON s.id=sw.sampleID\n\t\t\t\tLEFT JOIN vl_samples_worksheetcredentials AS wk ON sw.worksheetID=wk.id\n\t\t\t\tLEFT JOIN vl_results_roche AS res_r ON s.vlSampleID = res_r.SampleID\n\t\t\t\tLEFT JOIN vl_results_abbott AS res_a ON s.vlSampleID = res_a.SampleID\n\t\t\t\tLEFT JOIN vl_results_override AS res_o ON s.vlSampleID = res_o.sampleID\n\t\t\t\tLEFT JOIN vl_logs_samplerepeats AS log_s ON s.id = log_s.sampleID\n\t\t\t\tLEFT JOIN vl_users AS u ON wk.createdby = u.email\n\t\t\t\tLEFT JOIN vl_results_multiplicationfactor AS fctr ON wk.id=fctr.worksheetID\n\t\t\t\tWHERE\n\t\t\t\t";
     if ($id == 'x' and count($slctd_samples) == 0) {
         return "Please select atleast one";
     }
     $sql .= $id != 'x' ? " s.id={$id} LIMIT 1" : " s.id IN ({$slctd_samples_str}) GROUP BY s.id";
     $vldbresult = \DB::connection('live_db')->select($sql);
     if (\Request::has('pdf')) {
         $s_arr = $id != 'x' ? [$id] : explode(",", $slctd_samples_str);
         $sql = "INSERT INTO vl_facility_downloads (sample_id, downloaded_by, downloaded_on) VALUES";
         foreach ($s_arr as $smpl) {
             $sql .= "({$smpl}, '" . \Auth::user()->email . "', '" . date('Y-m-d H:i:s') . "'),";
         }
         $sql = trim($sql, ',');
         \DB::connection('live_db')->unprepared($sql);
         $pdf = \PDF::loadView('results.pdfresults', compact("vldbresult"));
         return $pdf->download('vl_results_' . session('facility') . '.pdf');
         //return \PDF::loadFile('http://www.github.com')->inline('github.pdf');
     }
     return view('results.result', compact("vldbresult", "printed"));
 }
开发者ID:CHAIUganda,项目名称:vl_dashboard,代码行数:25,代码来源:ResultsController.php

示例9: handle

 public function handle()
 {
     date_default_timezone_set("America/Mexico_City");
     $lastweek = Carbon::now()->startOfWeek()->subWeek();
     $startOfWeek = Carbon::now()->startOfWeek()->addDay();
     if ($startOfWeek->isTomorrow() == true) {
         $encuestas = Encuesta::History($lastweek, $startOfWeek)->get();
     } else {
         $encuestas = Encuesta::Reinicio($startOfWeek)->get();
     }
     $pdf = \PDF::loadView('reportes.Clientes', compact('encuestas'))->setOrientation('landscape')->save(public_path() . '/pdfs/' . 'reporte semanal' . '.pdf');
     $ToMail = 'victor.zapata@trep.mx';
     $ToName = 'Victor Zapata';
     $file = public_path() . '/pdfs/' . 'reporte semanal' . '.pdf';
     \Mail::send('emails.Reportes', [], function ($message) use($ToName, $ToMail, $file) {
         //remitente
         $message->from(env('MAIL_FROM'), env('MAIL_NAME'));
         //asunto
         $message->subject('Reporte Semanal Thaigreen');
         //receptor
         $message->to($ToMail, $ToName);
         $message->to('miguel.sanchez@trep.mx', 'Mike');
         $message->to('mahoganyp@thaigreen.mx', $name = null);
         //Adjunto
         $message->attach($file, ['as' => 'Reporte Semanal.PDF']);
     });
     chmod(public_path() . '/pdfs/' . 'reporte semanal.pdf', 0777);
     unlink(public_path() . '/pdfs/' . 'reporte semanal.pdf');
 }
开发者ID:Mowex,项目名称:preg,代码行数:29,代码来源:SendTask.php

示例10: getNota

 public function getNota($keyTrans = "")
 {
     $data['dataQuery'] = $this->transactionReturn->with('item')->where(['key_transaction' => $keyTrans])->get();
     $data['keyTrans'] = $keyTrans;
     $pdf = \PDF::loadView($this->folder . '.nota', $data);
     return $pdf->stream('invoiceoioiio.pdf');
 }
开发者ID:Abdulhmid,项目名称:inventory,代码行数:7,代码来源:ReturnItems.php

示例11: index

 public function index()
 {
     $parameter = array();
     $parameter['param'] = "ula mami kit  uii!!";
     $pdf = \PDF::loadView('printView', $parameter);
     return $pdf->download('Curriculum.pdf');
 }
开发者ID:uemCvs,项目名称:CV,代码行数:7,代码来源:PrintController.php

示例12: exportPdfatlet

 private function exportPdfatlet($atlets)
 {
     $name = 'Daftar Atlet_' . date('m-d-Y') . '.pdf';
     $data['datas'] = $atlets;
     // dd($data);
     $pdf = PDF::loadView('schools.cetakatlet', $data)->setPaper('a4')->setOrientation('portrait');
     return $pdf->download($name);
 }
开发者ID:inseo201,项目名称:atletik4,代码行数:8,代码来源:SchoolsController.php

示例13: exportmahasiswalogbook

 private function exportmahasiswalogbook($mlogbooks)
 {
     $akun = Admin::where('user_id', Sentry::getUser()->id)->first();
     $name = 'Log_book_Atletik_' . Date('Y') . '_' . $akun->noi . '_' . $akun->name . '.pdf';
     $data['datas'] = $mlogbooks;
     $pdf = PDF::loadView('logs.laporan', $data)->setPaper('a4')->setOrientation('landscape');
     return $pdf->download($name);
 }
开发者ID:inseo201,项目名称:atletik4,代码行数:8,代码来源:LogbooksController.php

示例14: test

 public function test(Request $request)
 {
     $property = Property::find($request->prop);
     $property->language = $property->propertyLanguages()->where('locale', 'en')->first();
     //        $property->thumbnails = $property->
     $pdf = \PDF::loadView('pdf.property', ['property' => $property]);
     return $pdf->stream('invoice.pdf');
 }
开发者ID:borislemke,项目名称:kbr,代码行数:8,代码来源:PdfController.php

示例15: generate

 public function generate($id)
 {
     $college = $this->checkCollege($id);
     $students = Student::where('college', 'LIKE', '%' . $college . '%')->orderBy('lastname')->get();
     $pdf = \PDF::loadView('layouts.spreadsheet', compact('students'));
     //return view('layouts.spreadsheet', compact('students'));
     return $pdf->download('test.pdf');
 }
开发者ID:neilpeter08,项目名称:thesis101,代码行数:8,代码来源:GenerateController.php


注:本文中的PDF::loadView方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。