public function getPaymentView()
 {
     $ac = new \App\Http\Controllers\AdminController();
     $users = User::all();
     $usersArray = [];
     foreach ($users as $user) {
         if ($user->profile || $user->hasRole('admin')) {
             if ($user->hasRole('admin')) {
                 $user->credit = $ac->getUserCredit($user->id);
                 array_push($usersArray, $user);
             }
         }
     }
     return view('superadmin.paymenthome')->with('admins', $usersArray);
 }
Пример #2
0
<?php

$bytes = App\Http\Controllers\AdminController::getFolderSize("fileStorage");
$bytes += 41127470;
$GB = round($bytes / 1073741824);
if ($bytes < 1024) {
    $type = "  B";
}
if ($bytes >= 1024 && $bytes < 1048576) {
    $bytes /= 1024;
    $type = " KB";
}
if ($bytes >= 1048576 && $bytes < 1073741824) {
    $bytes /= 1048576;
    $type = " MB";
}
if ($bytes >= 1073741824) {
    $bytes /= 1073741824;
    $type = " GB";
}
$bytes = sprintf("%.2f", $bytes) . $type;
?>
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7"> 	<![endif]-->
<!--[if IE 7]>    <html class="lt-ie9 lt-ie8">			<![endif]-->
<!--[if IE 8]>    <html class="lt-ie9"> 				<![endif]-->
<!--[if gt IE 8]><!-->
<html class="" lang="en" ng-app="Creative">
<!--<![endif]-->

<head>