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


PHP Sentry::findAllUsersWithAccess方法代碼示例

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


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

示例1: getManageUser

 public function getManageUser()
 {
     $operator = Sentry::findAllUsersWithAccess('operator');
     $operatorCollection = new Illuminate\Database\Eloquent\Collection($operator);
     $data = Datatable::collection($operatorCollection)->addColumn('full_name', function ($model) {
         return $model->first_name . ' ' . $model->last_name;
     })->showColumns('id', 'email', 'last_login')->searchColumns('full_name', 'email', 'last_login')->orderColumns('full_name', 'email', 'last_login')->make();
     $group = Group::all();
     return View::make('dashboard.admin.manageuser')->with('group', $group);
 }
開發者ID:antoniosai,項目名稱:daily-activity-management,代碼行數:10,代碼來源:AdminController.php

示例2: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     if (Datatable::shouldHandle()) {
         $operator = Sentry::findAllUsersWithAccess('operator');
         $operatorCollection = new Illuminate\Database\Eloquent\Collection($operator);
         return Datatable::collection($operatorCollection)->addColumn('full_name', function ($model) {
             return $model->first_name . ' ' . $model->last_name;
         })->showColumns('id', 'email', 'last_login')->searchColumns('full_name', 'email', 'last_login')->orderColumns('full_name', 'email', 'last_login')->make();
     }
     return View::make('dashboard.admin.manageuser');
 }
開發者ID:antoniosai,項目名稱:daily-activity-management,代碼行數:16,代碼來源:Coba.php

示例3: compact

             break;
         case 'never':
             break;
     }
     $template = $fax['sent'] ? 'emails.fax.sent.success' : 'emails.fax.sent.failed';
     if ($send) {
         Mail::send($template, compact('fax'), function ($message) use($fax) {
             $status = $fax['sent'] ? 'successfully sent' : 'sending failed';
             $message->to($fax['user']['email'])->subject('Fax ' . $status);
         });
     }
 }
 if ($fax['direction'] == 'received') {
     $phoneViewer = Permission::name('Faxbox\\Repositories\\Phone\\PhoneInterface', 'view', $fax['phone']['id']);
     $phoneAdmin = Permission::name('Faxbox\\Repositories\\Phone\\PhoneInterface', 'admin', $fax['phone']['id']);
     $users = Sentry::findAllUsersWithAccess([$phoneViewer, $phoneAdmin]);
     foreach ($users as $user) {
         $send = false;
         switch ($user->received_notification) {
             case 'always':
                 $send = true;
                 break;
             case 'mine':
                 $send = $user->hasAccess($phoneAdmin);
                 break;
             case 'groups':
                 // todo check groups
                 break;
             case 'never':
                 break;
         }
開發者ID:jeanfrancis,項目名稱:faxbox,代碼行數:31,代碼來源:observables.php


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