當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Properties::find方法代碼示例

本文整理匯總了PHP中Properties::find方法的典型用法代碼示例。如果您正苦於以下問題:PHP Properties::find方法的具體用法?PHP Properties::find怎麽用?PHP Properties::find使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Properties的用法示例。


在下文中一共展示了Properties::find方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: propertiesJsonQuery

 public function propertiesJsonQuery($string)
 {
     $propertiesClient = new Properties();
     if (!$this->validateProperties($string)) {
         return "";
     }
     $response = $propertiesClient->find($string);
     return $response;
 }
開發者ID:linniux,項目名稱:atsd-api-php,代碼行數:9,代碼來源:BasicApiProxy.php

示例2: postAddRepairHistory

 public function postAddRepairHistory()
 {
     $property = Properties::find(Input::get('properties_id'));
     if (!$property) {
         App::abort(404);
     }
     $validator = Validator::make(Input::all(), ['transaction' => 'required|in:REPLACEMENT,ADDITION', 'details' => 'required|max:50', 'effectdate' => 'required|date_format:Y-m-d', 'cost' => 'required|numeric']);
     if ($validator->fails()) {
         return Redirect::route('add-repair-history', $property->id)->withErrors($validator)->withInput();
     }
     $repair = new Repair();
     $repair->transaction = Input::get('transaction');
     $repair->details = Input::get('details');
     $repair->effectdate = Input::get('effectdate');
     $repair->cost = Input::get('cost');
     $repair->property()->associate($property);
     $repair->save();
     return Redirect::route('repair-history', $property->id)->with('alert', 'success|Repair history entry created successfully.');
 }
開發者ID:codeblues1516,項目名稱:godaddy,代碼行數:19,代碼來源:PropertyController.php

示例3: Properties

<?php

/*
* Copyright 2015 Axibase Corporation or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* https://www.axibase.com/atsd/axibase-apache-2.0.pdf
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace axibase\atsdPHP;

require_once '../atsdPHP/models/Properties.php';
require_once '../atsdPHP/HttpClient.php';
require_once '../atsdPHP/Utils.php';
$type = "System";
$entity = "awsswgvml001";
$queryClient = new Properties();
$json = '{"queries":[{"type":"' . $type . '","entity":"' . $entity . '"}]}';
$response = $queryClient->find($json);
$viewConfig = new ViewConfiguration("Properties for entity: " . $entity . "; type: " . $type, "properties");
$propertiesTable = Utils::propertyAsHtmlTable($response, $viewConfig);
Utils::render(array($propertiesTable));
開發者ID:linniux,項目名稱:atsd-api-php,代碼行數:29,代碼來源:PropertiesExample.php

示例4: getViewUserProperty

 public function getViewUserProperty($id)
 {
     $prop = Properties::find($id);
     $histories = PropertiesHistory::where('properties_id', $id)->orderBy('created_at', 'desc')->get();
     if (!$prop) {
         App::abort(404);
     }
     return View::make('view-property')->with('histories', $histories)->with('prop', $prop);
 }
開發者ID:codeblues1516,項目名稱:godaddy,代碼行數:9,代碼來源:UsersController.php


注:本文中的Properties::find方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。