<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\UserActivity;
use DB;
use Auth;


class MyprofileController extends Controller
{
    
    public function index(Request $request)
    {
         $dataLog            = new UserActivity;
         $dataLog->subject   = "My profile page";
         $dataLog->current_url = url()->current();
         $dataLog->previous_url = url()->previous();
         $dataLog->from_ip   = $request->ip();
         $dataLog->user_detail_Id = Auth::user()->id;
         $dataLog->save();

        $datas = DB::table('users')->where('email',Auth::user()->email)->first();
        $countrys=DB::table('countrys')->where('del_status',1)->get();
        $states=DB::table('states')->where('del_status',1)->get();
        $citys=DB::table('citys')->where('del_status',1)->get();
        return view('users.profile-settings', compact('datas','citys','states','countrys'));
    }
}
