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


PHP Report::with方法代码示例

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


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

示例1: show

 public function show($id)
 {
     $data = array('menu' => 'report', 'title' => 'Laporan', 'description' => '', 'breadcrumb' => array('Laporan' => route('admin.report')));
     $data['report'] = Report::with(array('user', 'event', 'socialaction', 'socialtarget'))->where('id', $id)->first();
     // return $data;
     return View::make('admin.pages.report.show')->with($data);
 }
开发者ID:whiterun,项目名称:bagikasih-v2,代码行数:7,代码来源:AdminReportController.php

示例2: pdf

 function pdf($report_id = false)
 {
     $this->pdf = new Pdf();
     File::requireOnce(app_path() . '/library/SVGGraph/SVGGraph.php');
     $this->margins = $this->pdf->getMargins();
     $this->pdf_w = $this->pdf->getPageWidth();
     //check if loading existing PDF
     if ($report_id !== false) {
         $report = json_decode(Report::with('answers')->find($report_id), true);
         if (count($report['answers']) != 6) {
             return Redirect::route('assesment.page1');
         }
         foreach ($report['answers'] as $answer) {
             $answers = json_decode($answer['answers'], true);
             if ($answer['section'] == 'page1') {
                 $this->guest_name = $answers['s1'];
                 $this->guest_company = $answers['s2'];
             }
             if ($answer['section'] == 'page2') {
                 $this->intent_score = $answers['intent_score'];
             }
             if ($answer['section'] == 'page3') {
                 $this->data_score = $answers['data_score'];
             }
             if ($answer['section'] == 'page4') {
                 $this->tech_score = $answers['technology_score'];
             }
             if ($answer['section'] == 'page5') {
                 $this->people_score = $answers['people_score'];
             }
             if ($answer['section'] == 'page6') {
                 $this->process_score = $answers['process_score'];
             }
         }
     } else {
         $this->rData = Session::get('report');
         $this->guest_name = $this->rData['page1']['s1'];
         $this->guest_company = $this->rData['page1']['s2'];
         $this->intent_score = $this->rData['page2']['intent_score'];
         $this->data_score = $this->rData['page3']['data_score'];
         $this->tech_score = $this->rData['page4']['technology_score'];
         $this->people_score = $this->rData['page5']['people_score'];
         $this->process_score = $this->rData['page6']['process_score'];
     }
     $this->overall_score = ($this->intent_score + $this->data_score + $this->tech_score + $this->people_score + $this->process_score) / 5;
     $this->getPDF();
 }
开发者ID:roarkmccolgan,项目名称:dellconvergedmaturity,代码行数:47,代码来源:PdfController.php

示例3: index

 public function index()
 {
     // init
     $data = array('menu' => $this->_menu, 'title' => 'Dashboard', 'description' => '', 'breadcrumb' => array('Dashboard' => '/'));
     // New payment that need confirmation
     $data['payments'] = Payment::with(array('user', 'donations'))->where('status', '=', 0)->get();
     // New social target that need confirmation
     $data['social_targets'] = SocialTarget::with(array('city', 'category', 'user'))->where('status', '=', 0)->get();
     // New action action that need confirmation
     $data['social_actions'] = SocialAction::with(array('city', 'category', 'user'))->where('status', '=', 0)->get();
     // New event that need confirmation
     $data['events'] = Events::with(array('city', 'category', 'user'))->where('status', '=', 0)->get();
     // New report that need confirmation
     $reports = Report::with(array('user'))->where('have_responded', '=', 0)->get();
     foreach ($reports as $report) {
         $report->setAppends(array('type'));
     }
     $data['reports'] = $reports;
     // return $data;
     return View::make('admin.pages.dashboard')->with($data);
 }
开发者ID:whiterun,项目名称:bagikasih-v2,代码行数:21,代码来源:AdminDashboardController.php

示例4: getReadReport

 public function getReadReport($id)
 {
     $report = Report::with('user')->find($id);
     $report->solved = '1';
     $report->save();
     return View::make('admin/reports/read')->with('title', 'Full Report')->with('report', $report);
 }
开发者ID:RHoKAustralia,项目名称:onaroll21_backend,代码行数:7,代码来源:AdminController.php

示例5: action_index

 public function action_index()
 {
     $per_page = 5;
     $reports = Report::with('project')->order_by('date', 'desc')->paginate($per_page);
     return View::make('report.index')->with('reports', $reports);
 }
开发者ID:nigobo,项目名称:laravel-play,代码行数:6,代码来源:report.php


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