當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。