i defined a public variable in laravel class then in search function i set this variable to the search data to use it in another function using $this->_lastSearch = $request->all() it didn't work, so i used a set function to set the value and a get function to get the value of the variable..
then in another function i used the get function to get the value of the variable as img below
i expected to get the value from set function