本文整理汇总了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("/");
}
}
示例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("/");
}
}
示例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("/");
}
}
示例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);
}