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


PHP Forms::where方法代码示例

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


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

示例1: editLetterName

 public function editLetterName()
 {
     // Declare the rules for the form validation
     $rules = array('rname' => 'required');
     // Create a new validator instance from our validation rules
     $validator = Validator::make(Input::all(), $rules);
     // If validation fails, we'll exit the operation now.
     if ($validator->fails()) {
         $data['status'] = 'error';
         $data['errors'] = $validator->messages()->toArray();
     } else {
         $form_id = Input::get('form_id');
         $form = Forms::where('id', $form_id)->first();
         $form->name = Input::get('rname');
         if ($form->save()) {
             $data['status'] = 'success';
         } else {
             $data['status'] = 'error';
         }
     }
     return Response::json($data);
 }
开发者ID:soarmorrow,项目名称:refercom,代码行数:22,代码来源:AjaxController.php

示例2: postPfTemplateSelectList

 public function postPfTemplateSelectList($destination)
 {
     $query = Forms::where('pid', '=', Session::get('pid'))->where('forms_destination', '=', $destination)->get();
     $data['options'] = array();
     if ($query) {
         $data['options'][''] = "*Select completed forms below.";
         foreach ($query as $row) {
             $data['options'][$row->forms_id] = $row->forms_title . ", completed on " . date('m/d/Y', $this->human_to_unix($row->forms_date));
         }
     } else {
         $data['options'][''] = "No forms completed by patient.";
     }
     echo json_encode($data);
 }
开发者ID:carlosqueiroz,项目名称:nosh-core,代码行数:14,代码来源:AjaxEncounterController.php

示例3: getEmbedForm

 public function getEmbedForm($id = null)
 {
     if ($form = Forms::where('unique_id', $id)->where('status', 'active')->first()) {
         $form = Forms::where('unique_id', $id)->where('status', 'active')->first();
         $fields = FormFields::where('form_id', $form->id)->get();
         return View::make('frontend/forms/embed', compact('form', 'fields'));
     }
 }
开发者ID:soarmorrow,项目名称:refercom,代码行数:8,代码来源:HomeController.php


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