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


PHP Family::all方法代码示例

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


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

示例1: findFamily

 public static function findFamily($user)
 {
     $families = \Family::all(["user_id = ?" => $user->id], ["member_id", "relation"]);
     $fs = array();
     foreach ($families as $f) {
         $u = \User::first(["id = ?" => $f->member_id], ["name"]);
         $fs[(int) $f->member_id] = ArrayMethods::toObject(["name" => $u->name, "user_id" => $f->member_id, "relation" => $f->relation]);
     }
     return $fs;
 }
开发者ID:HLitmus,项目名称:WebApp,代码行数:10,代码来源:patient.php

示例2: family

 /**
  * @before _secure
  */
 public function family($action = NULL, $id = NULL)
 {
     $this->seo(array("title" => "Family Added", "view" => $this->getLayoutView()));
     $view = $this->getActionView();
     if ($action == "delete") {
         $family = Family::first(array("id = ?" => $id));
         if ($family) {
             $family->delete();
         }
     }
     $members = Family::all(array("user_id = ?" => $this->user->id), array("member_id", "relation", "id"));
     $view->set("members", $members);
 }
开发者ID:HLitmus,项目名称:WebApp,代码行数:16,代码来源:patient.php

示例3: admin_index

 public function admin_index()
 {
     $family_laws = Family::all();
     return View::make('families.admin_index', compact('family_laws'));
 }
开发者ID:shankargiri,项目名称:taylor_latest,代码行数:5,代码来源:FamilylawsController.php


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