PATH:
home
/
lab2454c
/
sportsnovate.com
/
backups
/
core
/
app
/
Http
/
Controllers
/
Admin
<?php namespace App\Http\Controllers\Admin; use App\Http\Controllers\Controller; use App\Models\EmailLog; use App\Models\Transaction; use App\Models\UserLogin; use Illuminate\Http\Request; class ReportController extends Controller { public function transaction() { $pageTitle = 'Transaction Logs'; $transactions = Transaction::with('user')->orderBy('id','desc')->paginate(getPaginate()); $emptyMessage = 'No transactions.'; return view('admin.reports.transactions', compact('pageTitle', 'transactions', 'emptyMessage')); } public function transactionSearch(Request $request) { $request->validate(['search' => 'required']); $search = $request->search; $pageTitle = 'Transactions Search - ' . $search; $emptyMessage = 'No transactions.'; $transactions = Transaction::with('user')->whereHas('user', function ($user) use ($search) { $user->where('username', 'like',"%$search%"); })->orWhere('trx', $search)->orderBy('id','desc')->paginate(getPaginate()); return view('admin.reports.transactions', compact('pageTitle', 'transactions', 'emptyMessage','search')); } public function loginHistory(Request $request) { if ($request->search) { $search = $request->search; $pageTitle = 'User Login History Search - ' . $search; $emptyMessage = 'No search result found.'; $login_logs = UserLogin::whereHas('user', function ($query) use ($search) { $query->where('username', $search); })->orderBy('id','desc')->with('user')->paginate(getPaginate()); return view('admin.reports.logins', compact('pageTitle', 'emptyMessage', 'search', 'login_logs')); } $pageTitle = 'User Login History'; $emptyMessage = 'No users login found.'; $login_logs = UserLogin::orderBy('id','desc')->with('user')->paginate(getPaginate()); return view('admin.reports.logins', compact('pageTitle', 'emptyMessage', 'login_logs')); } public function loginIpHistory($ip) { $pageTitle = 'Login By - ' . $ip; $login_logs = UserLogin::where('user_ip',$ip)->orderBy('id','desc')->with('user')->paginate(getPaginate()); $emptyMessage = 'No users login found.'; return view('admin.reports.logins', compact('pageTitle', 'emptyMessage', 'login_logs','ip')); } public function emailHistory(){ $pageTitle = 'Email history'; $logs = EmailLog::with('user')->orderBy('id','desc')->paginate(getPaginate()); $emptyMessage = 'No data found'; return view('admin.reports.email_history', compact('pageTitle', 'emptyMessage','logs')); } }
[-] SubcategoryController.php
[edit]
[-] CategoryController.php
[edit]
[-] FrontendController.php
[edit]
[-] PageBuilderController.php
[edit]
[-] WithdrawalController.php
[edit]
[-] SupportTicketController.php
[edit]
[-] SpecificationController.php
[edit]
[-] AdvertisementController.php
[edit]
[+]
..
[-] HomeImageController.php
[edit]
[-] DepositController.php
[edit]
[-] ProductContentController.php
[edit]
[-] ExtensionController.php
[edit]
[-] MomentContentController.php
[edit]
[-] DynamicPageController.php
[edit]
[-] ManageUsersController.php
[edit]
[-] ReportController.php
[edit]
[-] GatewayController.php
[edit]
[-] EmailTemplateController.php
[edit]
[-] FaqContentController.php
[edit]
[-] OrderController.php
[edit]
[-] BrandController.php
[edit]
[-] ManualGatewayController.php
[edit]
[-] AdminController.php
[edit]
[+]
Auth
[-] LanguageController.php
[edit]
[-] WithdrawMethodController.php
[edit]
[-] FashionNftController.php
[edit]
[-] GeneralSettingController.php
[edit]
[-] ProductController.php
[edit]
[-] SmsTemplateController.php
[edit]