help with get laravel

-1

I need to get a parameter passed in the url. Ex: lugar.php?city=São Paulo . I need to get to São Paulo.

I tried but it is not working, with the code below:

$data['items'] = $results['query']
                   ->where('city',Request::query('city'))
                   ->orderBy('views','desc')
                   ->get()
                   ->toArray();
    
asked by anonymous 03.04.2018 / 21:01

1 answer

0

To get replies via url in laravel you can use Request::get('city');

    
13.04.2018 / 22:57