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


PHP Service::select方法代碼示例

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


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

示例1: findOne

 public function findOne($id)
 {
     $service = Service::select(array('services.id', 'outlet_id', 'services.name', 'price', 'active', 'time_operate', 'services.created_at', 'services.updated_at', 'service_details.summary', 'service_details.highlights', 'service_conditions.special_condition', 'service_conditions.condition1', 'service_conditions.condition2', 'condition_id', 'detail_id'))->leftJoin('service_details', 'service_details.id', '=', 'services.detail_id')->leftJoin('service_conditions', 'service_conditions.id', '=', 'services.condition_id')->where('services.id', $id)->first();
     return $service;
 }
開發者ID:EricBui0512,項目名稱:FYP,代碼行數:5,代碼來源:Service.php

示例2: listService

 /**
  * Display a listing of services
  *
  * @return Response
  */
 public function listService()
 {
     $title = Lang::get('site/services/title.service_management');
     $services = Service::select(array('services.*'))->active()->owner()->paginate(10);
     return View::make('site.services.index', compact('services', 'title'));
 }
開發者ID:EricBui0512,項目名稱:FYP,代碼行數:11,代碼來源:RetailersController.php

示例3: editDeal

 /**
  * Show the form for editing the specified service.
  *
  * @param  int  $id
  * @return Response
  */
 public function editDeal($id)
 {
     $deal = Deal::find($id);
     $services = Service::select(array('services.name', 'services.id'))->owner()->lists('name', 'id');
     $dealType = array(DealRepository::DEAL_TYPE_HOT_DEAL => DealRepository::DEAL_TYPE_HOT_DEAL, DealRepository::DEAL_TYPE_SERVICE => DealRepository::DEAL_TYPE_SERVICE);
     return View::make('site.deals.edit', compact('deal', 'services', 'dealType'));
 }
開發者ID:EricBui0512,項目名稱:FYP,代碼行數:13,代碼來源:OutletsController.php

示例4: editDeal

 /**
  * Show the form for editing the specified deal.
  *
  * @param  int  $id
  * @return Response
  */
 public function editDeal($id)
 {
     $title = 'Edit Deal';
     $deal = Deal::find($id);
     $services = Service::select(array('services.name', 'services.id'))->lists('name', 'id');
     return View::make('admin.deals.edit', compact('deal', 'services', 'title'));
 }
開發者ID:EricBui0512,項目名稱:FYP,代碼行數:13,代碼來源:AdminRetailerController.php

示例5:

					<input id="image" type="file" name="image" placeholder="Imagem">
					<input class="fields" type="text" name="title" placeholder="Nome do serviço">
					<textarea class="fields" type="text" name="description" placeholder="Descrição do serviço"></textarea>
					<button name="action" value="insert">INSERIR</button>
				</form>
				<?php 
if (isset($_GET['id'])) {
    ?>
					<h2>Atualizar serviço existente</h2>
					<form action="../controllers/services.php" method="post" enctype="multipart/form-data">
							<input id="image" name="image" type="file" value="<?php 
    echo $escolhido['image'];
    ?>
">
							<?php 
    $escolhido = Service::select($_GET['id'], $connect);
    ?>
							<input class="fields" name="title" type="text" value="<?php 
    echo $escolhido['title'];
    ?>
">
							<textarea class="fields" name="description" type="text"><?php 
    echo $escolhido['description'];
    ?>
</textarea>
							<input name="id" type="hidden" value="<?php 
    echo $escolhido['id'];
    ?>
">
							<button name="action" value="update">EDITAR</button>
					</form>
開發者ID:iagosilvany,項目名稱:projeto2,代碼行數:31,代碼來源:services.php


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