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