ok
Direktori : /proc/self/root/home2/selectio/www/billingsoftwarenew/core/app/Providers/ |
Current File : //proc/self/root/home2/selectio/www/billingsoftwarenew/core/app/Providers/AppServiceProvider.php |
<?php namespace App\Providers; use App\Constants\Status; use App\Models\AdminNotification; use App\Models\BalanceTransfer; use App\Models\Deposit; use App\Models\Dps; use App\Models\Fdr; use App\Models\Frontend; use App\Models\Language; use App\Models\Loan; use App\Models\SupportTicket; use App\Models\User; use App\Models\Withdrawal; use Illuminate\Pagination\Paginator; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider { /** * Register any application services. * * @return void */ public function register() { } /** * Bootstrap any application services. * * @return void */ public function boot() { $general = gs(); $activeTemplate = activeTemplate(); $viewShare['general'] = $general; $viewShare['activeTemplate'] = $activeTemplate; $viewShare['activeTemplateTrue'] = activeTemplate(true); $viewShare['language'] = Language::all(); $viewShare['emptyMessage'] = 'Data not found'; view()->share($viewShare); view()->composer('admin.partials.sidenav', function ($view) { $view->with([ 'bannedUsersCount' => User::banned()->count(), 'emailUnverifiedUsersCount' => User::emailUnverified()->count(), 'mobileUnverifiedUsersCount' => User::mobileUnverified()->count(), 'kycUnverifiedUsersCount' => User::kycUnverified()->count(), 'kycPendingUsersCount' => User::kycPending()->count(), 'pendingTicketCount' => SupportTicket::whereIN('status', [Status::TICKET_OPEN, Status::TICKET_REPLY])->count(), 'pendingDepositsCount' => Deposit::pending()->count(), 'pendingWithdrawCount' => Withdrawal::pending()->count(), 'dueFdrCount' => Fdr::due()->count(), 'dueDpsCount' => Dps::due()->count(), 'dueLoanCount' => Loan::due()->count(), 'pendingLoanCount' => Loan::pending()->count(), 'pendingTransferCount' => BalanceTransfer::pending()->count(), ]); }); view()->composer('admin.partials.topnav', function ($view) { $view->with([ 'adminNotifications' => AdminNotification::where('is_read', Status::NO)->with('user')->orderBy('id', 'desc')->take(10)->get(), 'adminNotificationCount' => AdminNotification::where('is_read', Status::NO)->count(), ]); }); view()->composer('partials.seo', function ($view) { $seo = Frontend::where('data_keys', 'seo.data')->first(); $view->with([ 'seo' => $seo ? $seo->data_values : $seo, ]); }); if ($general->force_ssl) { \URL::forceScheme('https'); } Paginator::useBootstrapFive(); } }