<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;

use Illuminate\Http\Request;

class AdminController extends Controller
{
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware('auth');
    }

    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Contracts\Support\Renderable
     */
    public function indexold()
    {
        return view('home');
    }

    public function index(Request $request) {
        return view('admin.users.dashboard');

        /*DB::enableQueryLog();
        $user_type = session('user_type');
        $admin_id = $request->session()->get('id');
        if($user_type == 2){
            //$getOrderList = UserMst::where('user_id',$admin_id);
            $getOrderList = UserMst::where('user_id',$admin_id)->where('is_deleted','=','0');
        }else if($user_type == 3){
            $getOrderList = new UserMst();
        //$getOrderList = UserMst::where('is_deleted','=','0');

        }

        $getOrderList = UserMst::whereNotIn('user_mst.status', [3,4,5,6]);
        $getOrderList = $getOrderList->where('is_deleted','=','0')->orderby('user_mst.created_at','desc')->limit(10)->get();

        $this->data['records'] = $getOrderList;
        $queries = DB::getQueryLog();
        return view('admin.users.dashboard', ['data' => $this->data, 'pageNo' => @$pageNo, 'record_per_page' => $this->record_per_page,'request'=>$request]);*/
    }
}
