當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Member::all方法代碼示例

本文整理匯總了PHP中app\Member::all方法的典型用法代碼示例。如果您正苦於以下問題:PHP Member::all方法的具體用法?PHP Member::all怎麽用?PHP Member::all使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\Member的用法示例。


在下文中一共展示了Member::all方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getAllMembers

 /**
  * Show the application dashboard to the user.
  *
  * @return Response
  */
 public function getAllMembers()
 {
     $members = Member::all();
     $data = array();
     foreach ($members as $member) {
         # code...
         $member_data = array();
         array_push($member_data, $member->member_id);
         array_push($member_data, $member->first_name);
         array_push($member_data, $member->last_name);
         array_push($member_data, $member->gender);
         array_push($member_data, $member->birthday);
         array_push($member_data, $member->address);
         array_push($member_data, $member->start_date);
         array_push($member_data, $member->end_date);
         array_push($member_data, $member->phone);
         array_push($member_data, $member->balance);
         array_push($member_data, $member->level);
         array_push($member_data, $member->email);
         array_push($member_data, "/member/" . $member->member_id);
         $data[] = $member_data;
     }
     $returner = array('data' => $data);
     echo json_encode($returner);
 }
開發者ID:EddieLi,項目名稱:clubmembers,代碼行數:30,代碼來源:MemberController.php

示例2: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $members = Member::all();
     foreach ($members as $member) {
         $member->load('devices', 'subgroups');
     }
     return response()->json($members, 200);
 }
開發者ID:nat45928,項目名稱:ShopTracker-API,代碼行數:13,代碼來源:MemberController.php

示例3: numMembers

 private function numMembers()
 {
     $numActive = Member::all()->where('is_active', 1)->count();
     $numInactive = Member::all()->where('is_active', 0)->count();
     $numDischarged = Member::onlyTrashed()->count();
     $numTotal = Member::withTrashed()->count();
     return ['numActive' => $numActive, 'numInactive' => $numInactive, 'numDischarged' => $numDischarged, 'numTotal' => $numTotal];
 }
開發者ID:alansfyeung,項目名稱:FLARES,代碼行數:8,代碼來源:DashboardController.php

示例4: export

 public function export()
 {
     $data = Member::all();
     Excel::create('Filename', function ($excel) use($data) {
         $excel->sheet('Sheetname', function ($sheet) use($data) {
             $sheet->fromArray($data);
         });
     })->download('xls');
 }
開發者ID:beyondlex,項目名稱:search,代碼行數:9,代碼來源:MemberController.php

示例5: getMembersForMultiselect

 public static function getMembersForMultiselect()
 {
     $members = Member::all(array('id', 'name'))->toArray();
     $multiselectMembers = array();
     foreach ($members as $member) {
         $multiselectMembers[$member['id']] = $member['name'];
     }
     return $multiselectMembers;
 }
開發者ID:yodarian,項目名稱:epgp,代碼行數:9,代碼來源:Member.php

示例6: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $data = Employee::all();
     $name = Auth::user()->name;
     $pos = ProjectOfficer::all();
     $adms = Admin::all();
     $tls = Teamleader::all();
     $mems = Member::all();
     return view('dropmin.dashboard.index')->with('data', $name)->with('pos', $pos)->with('adms', $adms)->with('tls', $tls)->with('mems', $mems)->with('data', $data);
 }
開發者ID:arisros,項目名稱:drope.mployee,代碼行數:15,代碼來源:DashboardController.php

示例7: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $members = Member::all();
     foreach ($members as &$member) {
         $member->setPriority($member->getPriority());
         $member->setLowerPriority($member->getLowerPriority());
     }
     $members = $members->sortByDesc('priority');
     return view('members.index', compact('members'));
 }
開發者ID:yodarian,項目名稱:epgp,代碼行數:15,代碼來源:MembersController.php

示例8: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $data = Employee::all();
     $name = Auth::user()->name;
     $pos = ProjectOfficer::all();
     $adms = Admin::all();
     $tls = Teamleader::all();
     $mems = Member::all();
     $proj = Project::all();
     $ac = Auth::user()->id;
     $acc = AccessClient::where('id_users', $ac)->get();
     return view('dropmin.dashboard.index')->with('data', $name)->with('pos', $pos)->with('adms', $adms)->with('tls', $tls)->with('mems', $mems)->with('projs', $proj)->with('accss', $acc)->with('datas', $data);
 }
開發者ID:arisros,項目名稱:drope.mployee,代碼行數:18,代碼來源:DashboardController.php

示例9: create

 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $members = [];
     foreach (Member::all() as $member) {
         $members += [$member->id => $member->name()];
     }
     $loans = Loan::all();
     $ltypes = [];
     foreach ($loans as $loan) {
         $ltypes += [$loan->id => $loan->name];
     }
     return view('admin.account.create', compact('ltypes', 'members', 'loans'));
 }
開發者ID:kaiservelilia,項目名稱:bpmcs,代碼行數:18,代碼來源:AccountController.php

示例10: index

 public function index(Request $request)
 {
     if (!Auth::check()) {
         return response()->json($this->notLoginJson, 401);
     } else {
         $user = Auth::user();
         if (!$user->hasRole('user')) {
             return response()->json($this->needPermissionsJson, 401);
         }
     }
     $members = Member::all();
     return response()->json($members);
 }
開發者ID:pedronalbert,項目名稱:lions-server,代碼行數:13,代碼來源:MemberController.php

示例11: index

 public function index()
 {
     foreach (Member::all() as $item) {
         sleep(2);
         // ip-api.com ban any IP addresses doing over 150 requests per minute
         $json = json_decode(file_get_contents("http://ip-api.com/json/{$item->ip}"));
         $item->city = $json->city;
         $item->country = $json->country;
         $member = Member::find($item->id);
         $member->city = $item->city;
         $member->country = $item->country;
         $member->save();
     }
     return "Ready";
 }
開發者ID:h2jose,項目名稱:GetCountryByIP,代碼行數:15,代碼來源:MemberController.php

示例12: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     // Start Check Authorization
     $invalid_auth = 1;
     $authRole = Auth::user()->UserRoles->role;
     if ($authRole == 1 or $authRole == 3 or $authRole == 5 or $authRole == 7 or $authRole == 9) {
         $invalid_auth = 0;
     }
     if ($invalid_auth == 1) {
         Alert::error('Anda tidak memilik akses ini')->persistent('close');
         return redirect('dashboard');
     }
     // End Check Authorization
     $data = Employee::all();
     $name = Auth::user()->name;
     $pos = ProjectOfficer::all();
     $adms = Admin::all();
     $tls = Teamleader::all();
     $mems = Member::all();
     return view('dropmin.record.index')->with('data', $name)->with('pos', $pos)->with('adms', $adms)->with('tls', $tls)->with('mems', $mems)->with('datas', $data);
 }
開發者ID:arisros,項目名稱:drope.mployee,代碼行數:26,代碼來源:RecordController.php

示例13: globalView

 /**
  * List of all member devices and their pertinent information
  *
  * @return \Illuminate\Http\Response
  */
 public function globalView(Request $request)
 {
     $validator = Validator::make($request->all(), ['type' => array('regex:/^[\\d]$/i')]);
     if ($validator->fails()) {
         return response()->json(["error" => "validator failed", "cause" => $validator->failed()], 400);
     } else {
         $ret = array();
         $members = Member::all();
         foreach ($members as $member) {
             $devices;
             if ($request->has('type')) {
                 $devices = $member->devices->where('type', $request->type);
             } else {
                 $devices = $member->devices;
             }
             foreach ($devices as $device) {
                 $entry = ['mid' => $member->id, 'did' => $device->id, 'deviceID' => $device->deviceID, 'deviceName' => $device->name, 'memberName' => $member->name, 'deviceType' => $device->type];
                 array_push($ret, $entry);
             }
         }
         return response()->json($ret, 200);
     }
 }
開發者ID:nat45928,項目名稱:ShopTracker-API,代碼行數:28,代碼來源:MemberDeviceController.php

示例14: sendRead

 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function sendRead()
 {
     $members = Member::all();
     //all data of member collection
     $inbox_id = HelperController::getPage();
     $id = Auth::id();
     $author = User::find($id);
     $inbox = Inbox::find($inbox_id);
     //find data in Inbox collection
     $unread = Inbox::where('mail_read', '=', '0')->where('member_id', '=', $id)->get()->count();
     //mailbox view
     return view('vendor/flatAdmin/mailRead', compact(array('members', 'author', 'inbox', 'unread', 'id')));
 }
開發者ID:BDMADE,項目名稱:team1,代碼行數:19,代碼來源:MailController.php

示例15: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $membersObj = Member::all();
     return view('members.index', compact('membersObj'));
 }
開發者ID:nowarena,項目名稱:laravel,代碼行數:10,代碼來源:MembersController.php


注:本文中的app\Member::all方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。