I wanted to get the value of type from the url "example.com/user?type=agent" using livewire.
I have tried using Input::get('type') but is not working in livewire component class
This is an example you can try:
public $type;
protected $queryString = ['type'];
return view('bladefile',[
'posts' => Post::where('title', 'like', '%'.$this->type.'%')->get(),
]);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With