Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

autoHydrateEntityFromInput not working on update? #77

@warrenca

Description

@warrenca

Hi! I have this code below which is basically an update to a an entry in the Country table and I was wondering that when I enable autoHydrateEntityFromInput it is not working. When the scenario is "save" it works. Am I doing it all wrong or is it really not how it works.

public function postCountryEdit($id) {
    $country = Country::find($id);
    // no need to populate each field since we are using Ardent hydrate..

    if ($country->save())
    {
        Session::flash('success','Country update success!');
        return Redirect::to('country/edit/'.$id);
    }else{
        $error = $country->errors()->all();
        Session::flash('error', $error );            
        return Redirect::to('country/edit/'.$id);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions