Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • cakephp 3 not able to save data

    • 0
    • 0
    • 0
    • 1
    • 0
    • 1
    • 0
    • 724
    Answer it

    any cakephp 3 developer here? i am getting this error. my code is given in pic. i m inserting data into status table from users controller. how my controller will know abt status table in cakephp 3. help pls.

    Error: Call to a member function newEntity() on a non-object File /home/quickcod/public_html/cakephp/src/Controller/UsersController.php Line: 39

    cakephp 3 not able to save data

 1 Answer(s)

  • Hi Suddhanshu, It seems that you have not included the Model for Status in your code from the initial look at the error.

    You have to included the code specifying the model that you need to use in the Controller

    public $uses = array('Status','OtherModel');
    

    If you already have done that please send in the detailed error log to investigate the issue further.

    Naren

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: