当前位置: 首页>>代码示例>>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;未经允许,请勿转载。