I want to add a post in laravel livewire which needs to be look like if categories are not in dropdown then it should create a category with that name, similarly for tags i’m beginner to livewire please help me how to achieve that without page loading on final submit.
I have tried
function mount(){
$this->categories= Categories::all();
$this->category = $this->article->category;
$this->post_tags = $this->article->tags;
$this->tags = Tags::all();
-------
--------
--------
}
function store(){
$this->article->description = $this->description;
----
----
----
}
But I’m not getting categories and tags into store method by ‘$this->category’ and ‘$this->post_tags’ when changing in form. this is returning only the null or when editing the old values from db not the form values