当前位置: 首页>>代码示例>>PHP>>正文


PHP Place::find方法代码示例

本文整理汇总了PHP中Place::find方法的典型用法代码示例。如果您正苦于以下问题:PHP Place::find方法的具体用法?PHP Place::find怎么用?PHP Place::find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Place的用法示例。


在下文中一共展示了Place::find方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: uploadImage

 public function uploadImage($placeId)
 {
     $place = Place::find($placeId);
     if (!$place) {
         return $this->errorNotFound('Place not found');
     }
     exit('This would normally upload an image somewhere but that is hard.');
 }
开发者ID:rcuvgd,项目名称:Build-API..,代码行数:8,代码来源:PlaceController.php

示例2: show

 public function show($id)
 {
     $place = Place::find($id);
     if (!$place) {
         return $this->errorNotFound('Did you just invent an ID and try loading a place? Muppet.');
     }
     return $this->respondWithItem($place, new PlaceTransformer());
 }
开发者ID:rcuvgd,项目名称:Build-API..,代码行数:8,代码来源:PlaceController.php

示例3: getSelectPlaces

 public function getSelectPlaces()
 {
     $placeModels = Place::find();
     $places = [0 => 'Немає'];
     foreach ($placeModels as $place) {
         $places[$place->id] = $place->name;
     }
     return $places;
 }
开发者ID:xsat,项目名称:www.test.com,代码行数:9,代码来源:Place.php

示例4: show

 public function show($id)
 {
     $place = Place::find($id);
     return $this->respondWithItem($place, new PlaceTransformer());
 }
开发者ID:rcuvgd,项目名称:Build-API..,代码行数:5,代码来源:PlaceController.php

示例5: edit

 /**
  * Show the form for editing the specified place.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $place = Place::find($id);
     return View::make('places.edit', compact('place'));
 }
开发者ID:C-a-p-s-t-o-n-e,项目名称:capstone.dev,代码行数:11,代码来源:PlacesController.php

示例6: handleRequest

 public function handleRequest()
 {
     // Fetch all the places:
     $places = Place::find();
     render('place', array('title' => 'Browsing places', 'places' => $places));
 }
开发者ID:backandy,项目名称:theplaces,代码行数:6,代码来源:place.controller.php

示例7: borrar_lugar

 public function borrar_lugar()
 {
     $id = Input::get('idedit');
     $lugar = Place::find($id);
     if ($lugar->delete()) {
         Session::flash('message', 'Eliminado correctamente');
         Session::flash('class', 'success');
     } else {
         Session::flash('message', 'Ha ocurrido un error, intentelo nuevamente');
         Session::flash('class', 'danger');
     }
     return Redirect::to('lugar');
 }
开发者ID:bmrpas,项目名称:SHREDDER,代码行数:13,代码来源:LugarController.php

示例8: getMeetUpLocation

 static function getMeetUpLocation($user1_id, $user2_id)
 {
     $query = $GLOBALS['DB']->query("SELECT location_id FROM meetups WHERE user1_id = {$user1_id} AND user2_id = {$user2_id} AND confirm_meet_usr1 IS NULL;");
     $result = $query->fetchAll(PDO::FETCH_ASSOC);
     $location_id = $result[0]['location_id'];
     $meetup_spot = Place::find($location_id);
     return $meetup_spot;
 }
开发者ID:juliocesardiaz,项目名称:Face2Face,代码行数:8,代码来源:Place.php


注:本文中的Place::find方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。