当前位置: 首页>>代码示例>>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;未经允许,请勿转载。