Level 122
does your view file have a single root element?
have you installed livewire scripts and livewire styles in your view?
why in this case i cant bind textarea in to the $input livewire don't send any request!?
@auth
@include('layouts.errors')
<form wire:submit.prevent="sendComment">
<div class="form-group my-4">
<label for="comment" class="p-r-mute">leave a comment</label>
<textarea id="comment" wire:model="input" class="form-control" placeholder="type.." rows="4" required></textarea>
</div>
<button type="submit" class="btn-get-primery">send</button>
</form>
@endauth
class :
class SingleSerial extends Component
{
public $model;
public $input;
public $parent_id = '0';
public function mount(Series $seriesSlug)
{
$seriesSlug->increment('viewCount');
SEO::setTitle(strip_tags($seriesSlug->title));
SEO::setDescription(strip_tags(str::limit($seriesSlug->body , 250)));
SEOMeta::setKeywords(strip_tags($seriesSlug->keyWords));
OpenGraph::addProperty('type', 'Series');
OpenGraph::addImage(asset('storage/'.$seriesSlug->imageUrl));
$this->model = $seriesSlug;
}
public function render()
{
return view('livewire.single.single-serial' , [
'comments' => $this->model->comments()->where('approved' , 1)->where('parent_id', 0)->latest()->with('comments')->paginate(15)
]);
}
}
does your view file have a single root element?
have you installed livewire scripts and livewire styles in your view?
Please or to participate in this conversation.