title = $_POST['title']; $post->description = $_POST['description']; //Call the save function. if(!$post->save()){ return http_response_code(400); }else{ return http_response_code(200); } }