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
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 the example you can try:
        public $type;
        protected $queryString = ['type'];
        
        return view('bladefile',[
                    'posts' => Post::where('title', 'like', '%'.$this->type.'%')->get(),
                ]);
          }
     
You can do:
use Illuminate\Http\Request;
$type = $request->input('type');
$type = request('type');