コード例 #1
0
 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);
 }
コード例 #2
0
 /**
  * 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');
 }
コード例 #3
0
ファイル: observables.php プロジェクト: jeanfrancis/faxbox
             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;
         }