本文整理汇总了PHP中Tax::find方法的典型用法代码示例。如果您正苦于以下问题:PHP Tax::find方法的具体用法?PHP Tax::find怎么用?PHP Tax::find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tax
的用法示例。
在下文中一共展示了Tax::find方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
});
Route::get('erporders/show/{id}', function ($id) {
$order = Erporder::findorfail($id);
return View::make('erporders.show', compact('order'));
});
Route::get('erppurchases/show/{id}', function ($id) {
$order = Erporder::findorfail($id);
return View::make('erppurchases.show', compact('order'));
});
Route::get('erpquotations/show/{id}', function ($id) {
$order = Erporder::findorfail($id);
return View::make('erpquotations.show', compact('order'));
});
Route::get('api/getrate', function () {
$id = Input::get('option');
$tax = Tax::find($id);
return $tax->rate;
});
Route::get('morgue', function () {
return View::make('morgue');
});
Route::resource('enquiries', 'EnquiriesController');
Route::get('enquiries/edit/{id}', 'EnquiriesController@edit');
Route::get('enquiries/delete/{id}', 'EnquiriesController@destroy');
Route::post('enquiries/update/{id}', 'EnquiriesController@update');
Route::get('enquiries/show/{id}', 'EnquiriesController@show');
Route::resource('resolutions', 'ResolutionsController');
Route::get('resolutions/create/{id}', 'ResolutionsController@create');
Route::get('resolutions/edit/{id}', 'ResolutionsController@edit');
Route::get('resolutions/delete/{id}', 'ResolutionsController@destroy');
Route::post('resolutions/update/{id}', 'ResolutionsController@update');
示例2: edit
/**
* Show the form for editing the specified branch.
*
* @param int $id
* @return Response
*/
public function edit($id)
{
$tax = Tax::find($id);
return View::make('taxes.edit', compact('tax'));
}
示例3: ajaxProductPriceSearch
/**
* Return a json list of records matching the provided query
*
* @return json
*/
public function ajaxProductPriceSearch()
{
$product_id = Input::get('product_id');
$customer_id = Input::get('customer_id');
$product_string = Input::get('product_string');
$product = Product::find(intval($product_id));
$tax = Tax::find(intval($product->tax_id));
// ToDo: Calculate priece per $customer_id now!
$product->price_customer = 0.83 * $product->price;
$product->price_customer_with_tax = $product->price_customer * (1 + $tax->percent / 100);
// return Product::searchByNameAutocomplete(Input::get('query'));
return View::make('products.ajax.show_price', compact('product', 'tax', 'product_string'));
}