Povilas how do you reset properties that are model binded (e.g. public Post $post)? say i want to reset a post title so i do this: $this->reset('post.title') but it doesnt work.
$this->reset way may not properly work in this case..
$this->post->title = '' will update previous created record.
you can reassign new post model instance to post property after saving new record...
Povilas how do you reset properties that are model binded (e.g. public Post $post)? say i want to reset a post title so i do this: $this->reset('post.title') but it doesnt work.
To be honest, I haven't tried that way. Would
$post->title = ''
work maybe?i did it using this way: $this->post->title = ''
wanted to use the $this->reset way but i guess its not possible. thanks Povilas!
$this->reset way may not properly work in this case.. $this->post->title = '' will update previous created record. you can reassign new post model instance to post property after saving new record...
$this->post = new Post();