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


PHP Software::all方法代码示例

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


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

示例1: softwareAssetsReports

 public function softwareAssetsReports()
 {
     if (Session::has('username') && (Session::get('user_type') == "Root" || Session::get('user_type') == "Admin" || Session::get("user_type") == "User")) {
         $view = View::make("Reports.software_assets_reports");
         $view->nav = "system";
         $view->tab = "software";
         $totalSoftwareAssets = Software::all()->count();
         $softwareTypes = SoftwareType::orderBy("software_type")->get();
         $available = Software::where("status", "=", "Available")->count();
         $pwu = Software::where("status", "=", "PWU")->count();
         $retired = Software::where("status", "=", "Retired")->count();
         $test_case = Software::where("status", "=", "Test Case")->count();
         $lost = Software::where("status", "=", "Lost")->count();
         $view->softwareTypes = $softwareTypes;
         $view->available = $available;
         $view->pwu = $pwu;
         $view->retired = $retired;
         $view->test_case = $test_case;
         $view->lost = $lost;
         $view->totalSoftwareAssets = $totalSoftwareAssets;
         return $view;
     } else {
         return Redirect::to("/");
     }
 }
开发者ID:johndavedecena,项目名称:vault,代码行数:25,代码来源:ReportsController.php

示例2: exportSoftware

 public function exportSoftware()
 {
     if (Session::has('username') && (Session::get('user_type') == "Root" || Session::get('user_type') == "Admin")) {
         $view = View::make("Export.export_software");
         $view->nav = "system";
         $view->tab = "software";
         $view->software = Software::orderBy("asset_tag")->paginate(25);
         $view->results = Software::all()->count();
         $getSoftwareTypes = SoftwareType::all();
         $softwareTypes = array("" => "--Select One--");
         foreach ($getSoftwareTypes as $gst) {
             $softwareTypes[$gst->id] = $gst->software_type;
         }
         $view->softwareTypes = $softwareTypes;
         return $view;
     } else {
         return Redirect::to("/");
     }
 }
开发者ID:johndavedecena,项目名称:vault,代码行数:19,代码来源:ExportController.php

示例3: advancedSearch

 public function advancedSearch()
 {
     if (Session::has('username') && (Session::get('user_type') == "Root" || Session::get('user_type') == "Admin" || Session::get("user_type") == "User")) {
         $view = View::make("Assets.Software.software_advanced_search");
         $view->nav = "assets";
         $view->tab = "search";
         $view->software = Software::orderBy("asset_tag")->paginate(25);
         $view->results = Software::all()->count();
         $getSoftwareTypes = SoftwareType::all();
         $softwareTypes = array("" => "--Select One--");
         foreach ($getSoftwareTypes as $gst) {
             $softwareTypes[$gst->id] = $gst->software_type;
         }
         $view->softwareTypes = $softwareTypes;
         return $view;
     } else {
         return Redirect::to("/");
     }
 }
开发者ID:johndavedecena,项目名称:vault,代码行数:19,代码来源:SoftwareController.php

示例4: allSoftware

 /**
  * Gets all installed software from this server
  *
  * @param array $scopes optional
  *
  * @return array List of PatrolSdk\Software
  */
 public function allSoftware($scopes = [])
 {
     if (!$this->id) {
         throw new Exception("The server has no ID, can\\'t get software");
     }
     $software = new Software($this->patrol);
     $software->defaults(['server_id' => $this->id]);
     return $software->all($scopes);
 }
开发者ID:zdevil,项目名称:patrolsdk-php,代码行数:16,代码来源:Server.php


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