SQLSTATE[42S22]: Column not found: 1054 Unknown column 'user_shops' in 'where clause' (SQL: select * from `shops` where `user_shops` = 233 limit 1) : [Error Image ][1]**Working on a Multi vendor website . Suddenly got this error when shop/vendor user  want to login no problem normal user** Here two type user one is vendor or ShopOwner/ another one normal Customer when vendor want to logging got this error. But normal user  no Problem facing for login. Added new column but problem is continue SQL integrity Error.

 **Here is Login Controller.**
> Details for Login Controller

    public function userlogin(Request $request){
            $data = Cart::getContent();
            $this->validate($request, [
                'email' => 'required',
                'password' => 'required',
                ],[
                'email.required' => 'Email not matched with Database!',
                'password.required' => 'Password not matched with Database!',
                ]);
    
            $checkUserInput = filter_var($request->input('email'), FILTER_VALIDATE_EMAIL)?'email': 'username';
            $user = Auth::guard('web')->attempt([$checkUserInput => $request->email,'password'=>$request->password]);
            if($user == 'true'){
                if(Auth::user()->is_activated == 1){
                    if(count($data)>0){
                      if(count(Cart::session(Auth::user()->id)->getContent())>0){
                         foreach ($data as $key => $value) {
                           if(!Cart::session(Auth::user()->id)->get($value->id) ){
                              Cart::session(Auth::user()->id)->add($value->id, $value->name,$value->price,$value->quantity, $value->image,array('color' => $value->attributes->color));
                           }else{
                             Cart::session(Auth::user()->id)->update($value->id, array(
                               'quantity' => array(
                                   'relative' => false,
                                   'value' => $request->quantity
                               ),
                               'attributes' => array(
                                 'color' => $value->attributes->color
                               ),
                             ));
                           }
                         }
                      }else{
                        foreach ($data as $key => $value) {
                          Cart::session(Auth::user()->id)->add($value->id, $value->name,$value->price,$value->quantity, $value->image,array('color' => $value->attributes->color));
                        }
                      }
                    }
    
    
                    if(Auth::user()->user_type == 2){
                      $model = Shop::where('user_id',Auth::user()->$user_id)->first();   
                             
                      if($model){
                        if($request->previous){
                          return redirect()->route('neneMart.dashboard');
                        }else{
                          return Redirect::to($request->previous);
                        }
                      }else{
                        if(empty($request->previous)){
                          return redirect()->route('create-shop');
                        }else{
    
                          return Redirect::to($request->previous);
                        }
                      }
                    }else{
                      if(empty($request->previous)){
                        return redirect()->route('home');
                      }else{
                        return Redirect::to($request->previous);
                      }
                    }
                 }
                else{
                    return redirect()->route('user-login')->with(Auth::logout())->with('error', 'User email has not been activated yet!');
                }
            }else{
                return redirect()->route('user-login')->with('error', 'Whoops! Wrong Email or Username or Password !');
            }
        }`

> ROUTE

    Route:: get('user-login', 'Auth\LoginController@usershowLoginForm')->name('user-login');
    Route:: post('userLogin', 'Auth\LoginController@userlogin')->name('userLogin');

> Shop Management Controller

    public function index()
    {
        $shop = Shop::where('user_id',Auth::user()->id)->first();
        $model = ShopManagement::where('shop_id','Nenemart-'.$shop->id)->first();
        $shopid = 'Nenemart-'.$shop->id;
        $agent = new Agent();
        if($agent->isMobile() || $agent->isTablet()){
          return view('mobile.mart.shopmanagemnt',compact('model','shopid'));
        }else{
          return view('frontend.mart.shopmanagemnt',compact('model','shopid'));
        }

    }

    public function vendorShop(){
      $shop = Shop::where('user_id',Auth::user()->id)->first();
      $model = ShopManagement::where('shop_id','Nenemart-'.$shop->id)->first();
      $vendorProducts = Product::orderBy('id', 'dese')->where('created_by', $shop->id)->where('type', 1)->get();
      $agent = new Agent();
      if($agent->isMobile() || $agent->isTablet()){
        return view('mobile.mart.vendorShop',compact('model', 'vendorProducts'));
      }else{
        return view('frontend.mart.vendorShop',compact('model', 'vendorProducts'));
      }

    }
**Error**


  [1]: https://i.stack.imgur.com/CtD6W.jpg