Laravel Data Save Error SQLSTATE[HY000]: General error: 1364


  • Web Development

    SQLSTATE[HY000]: General error: 1364 Field 'username' doesn't have a default value (SQL: insert into registerusers (updated_at, created_at) values (2019-07-15 12:03:06, 2019-07-15 12:03:06))
    menna me error eka enwa, data base ekata data sav krnna giama.

    public function storeRegister(Request $request)
    {
    $registeruser = new registeruser;
    $request->all();
    $registeruser->save();
    }



  • usernam ekyna field ekt value ekak naha kyla kyanne oya



  • oyage code eke RegisterUser kyna model eke new object ekk hdnwa witarai, ekata values add krnne nha oya ekai error ekk enne, mehema try krnna

    registeruser::create($request->all());