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


PHP Picture::getByRefId方法代碼示例

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


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

示例1: edit

 /**
  * Show the form for editing the specified outlet.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($outlet)
 {
     $countries = Country::lists('country', 'id');
     $cities = City::where('country_id', Country::DEFAULT_COUNTRY)->lists('city', 'id');
     $retailers = Retailer::owner()->lists('name', 'id');
     $addresses = Address::select(array('addresses.id', 'addresses.address'))->lists('address', 'id');
     $images = Picture::getByRefId($outlet->id, 'outlet');
     if ($outlet->status == 'active') {
         $title = Lang::get('site/outlets/title.outlet_update');
     } else {
         $title = Lang::get('site/outlets/title.create_a_new_outlet');
     }
     return View::make('site.outlets.edit', compact('countries', 'cities', 'outlet', 'title', 'retailers', 'addresses'))->nest('imageForm', 'site.partials.image.create', ['refId' => $outlet->id, 'type' => 'outlet', 'images' => $images]);
 }
開發者ID:EricBui0512,項目名稱:FYP,代碼行數:20,代碼來源:OutletsController.php

示例2: editService

 /**
  * Show the form for editing the specified service.
  *
  * @param  int  $id
  * @return Response
  */
 public function editService($service)
 {
     if ($service->status == 'active') {
         $title = Lang::get('site/services/title.service_update');
     } else {
         $title = Lang::get('site/services/title.create_a_new_service');
     }
     $outlets = Outlet::active()->owner()->lists('name', 'id');
     $images = Picture::getByRefId($service->id, 'service');
     return View::make('site.services.edit', compact('service', 'outlets', 'title'))->nest('imageForm', 'site.partials.image.create', ['refId' => $service->id, 'type' => 'service', 'images' => $images]);
 }
開發者ID:EricBui0512,項目名稱:FYP,代碼行數:17,代碼來源:RetailersController.php

示例3: editService

 /**
  * Show the form for editing the specified outlet.
  *
  * @param  int  $id
  * @return Response
  */
 public function editService($service)
 {
     $title = 'Edit Service';
     $outlets = Outlet::lists('name', 'id');
     $images = Picture::getByRefId($service->id, 'service');
     return View::make('admin.services.edit', compact('service', 'outlets', 'title'))->nest('imageForm', 'site.partials.image.create', ['refId' => $service->id, 'type' => 'service', 'images' => $images]);
     // return View::make('admin.services.edit', compact('service', 'title', 'outlets' ));
 }
開發者ID:EricBui0512,項目名稱:FYP,代碼行數:14,代碼來源:AdminRetailerController.php

示例4: getEdit

 /**
  * Get edit user's profile
  * @param $username
  * @return mixed
  */
 public function getEdit($username)
 {
     $userModel = new User();
     $user = $userModel->getUserByUsername($username);
     $countries = Country::lists('country', 'id');
     $cities = City::where('country_id', Country::DEFAULT_COUNTRY)->lists('city', 'id');
     // Check if the user exists
     if (is_null($user)) {
         return App::abort(404);
     }
     $images = Picture::getByRefId($user->id, 'user');
     return View::make('site/user/edit', compact('user', 'countries', 'cities'))->nest('imageForm', 'site.partials.image.create', ['refId' => $user->id, 'type' => 'user', 'images' => $images]);
 }
開發者ID:EricBui0512,項目名稱:FYP,代碼行數:18,代碼來源:UserController.php


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