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


PHP UserInfo::all方法代码示例

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


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

示例1: saveInfo

 public function saveInfo()
 {
     $fname = Input::get('fname');
     $lname = Input::get('lname');
     $mname = Input::get('mname');
     $address = Input::get('address');
     $contact = Input::get('contact');
     $email = Input::get('email');
     $getInformation = new UserInfo();
     $getInformation['firstname'] = $fname;
     $getInformation['lastname'] = $lname;
     $getInformation['middleInitial'] = $mname;
     $getInformation['address'] = $address;
     $getInformation['contactNo'] = $contact;
     $getInformation['email'] = $email;
     if ($getInformation->save()) {
         $allReserves = UserInfo::all();
         foreach ($allReserves as $allReserve) {
             $response[] = array("reserve_id" => $allReserve['id'], "fname" => $allReserve['firstname'], "lname" => $allReserve['lastname'], "mname" => $allReserve['middleInitial'], "address" => $allReserve['address'], "contact" => $allReserve['contactNo'], "email" => $allReserve['email']);
         }
     }
     return $response;
 }
开发者ID:jhunel2389,项目名称:baeyaya-dev,代码行数:23,代码来源:FileMaintenanceController.php

示例2:

              <input type="checkbox" name="admin" id="admin" value="1">
            </fieldset>
          </div>
          <!--<button type="button" id="saveInfo" class="btn btn-info">Save Information</button>-->
          <button type="button" id="updateInfo"class="btn btn-warning">Update Information</button>
          
        </form>
      </div>
      <div class="col-md-8">
        <div class="list-group">
          <a href="#" class="list-group-item active">
           Guest Information
          </a>
          <div id="guest_list">
            <?php 
$allReserves = UserInfo::all();
?>
            @foreach($allReserves as $allReserve)
            <div class="input-group" id="reserve{{$allReserve['id']}}">
            <a href="{{ URL::Route('getReserve',$allReserve['id']) }}" class="list-group-item">{{$allReserve['lastname']}},{{$allReserve['firstname']}}</a>
            <span class="input-group-addon" data-type="edit" data-id="{{$allReserve['id']}}" style="cursor:pointer">Edit</span>
            <!--<span class="input-group-addon" data-type="delete" data-id="{{$allReserve['id']}}" style="cursor:pointer">Delete</span>-->
            </div>
            @endforeach
          <div>
        </div>
      </div>
    </div>
  </div>
</div>
</div>
开发者ID:jhunel2389,项目名称:baeyaya-dev,代码行数:31,代码来源:filemaintenance.blade.php


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