示例#1
0
 /**
  * Show the setting upload RKA Ritel page.
  *
  * @return View
  */
 public function rka_uploaded()
 {
     $target_rka = new Target();
     $target_rka_final = $target_rka->getTargetRitel();
     return View::make('ebri::settings.upload_rka_ritel')->With('products', $target_rka->ProductOnTarget())->With('title_table', $this->getTemplate()->setTitleHeaderTableSavings($target_rka->ProductOnTarget()))->with('target', $this->getTemplate()->extract_branch_office_product($target_rka_final))->with('branches', BranchOffice::where('category', '=', 1)->get()->toArray())->with('offices', $target_rka->BranchOfficeOnTarget());
 }
示例#2
0
 /**
  * Register Template Reports eBri
  *
  * @return void
  */
 public function registerTemplate()
 {
     $this->app['ebri.template'] = $this->app->share(function ($app) {
         $branches = Branch::all();
         if ($branches->isEmpty()) {
             $branches = array();
         } else {
             $branches = $branches;
         }
         $branchOffice = BranchOffice::all();
         if ($branchOffice->isEmpty()) {
             $branchOffice = array();
         } else {
             $branchOffice = $branchOffice;
         }
         $products = Products::all();
         if ($products->isEmpty()) {
             $products = array();
         } else {
             $products = $products;
         }
         return new TemplateSupport($branches, $branchOffice, $products);
     });
 }