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