Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get type parameter value from URL with livewire [closed]

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

like image 968
Abenslive Avatar asked Nov 19 '25 00:11

Abenslive


1 Answers

This is an example you can try:

public $type;
protected $queryString = ['type'];
        
return view('bladefile',[
            'posts' => Post::where('title', 'like', '%'.$this->type.'%')->get(),
                ]);
}
like image 92
Dipta Avatar answered Nov 21 '25 14:11

Dipta