Laravel controller Single Responsibility principle
Here are some simple tips on how you can improve your code. There are still more you can do to improve it, but is a good start and it helps you get closer to the single responsibility principle.


Move the API request to a service (App\Services\ProductsApi\Client).
Move the formatting of city to a helper (App\Helpers\Format).
Consider moving the formatting of city to CityRequest so the controller doesn't have to do it.
No need for new variables, use the properties returned by $response instead.
No need for else-statement, since the if-statement has return.


Your controller:

use App\Services\ProductsApi\Client;

public function __construct(Client $client)
{
    $this-&gt;client = $client;
}

public function displayData(CityRequest $request)
{
    if (isset($request-&gt;validator) &amp;&amp; $request-&gt;validator-&gt;fails()) {
        return redirect()-&gt;back()-&gt;withErrors($request-&gt;validator-&gt;messages());
    }

    $response = $this-&gt;client-&gt;getRecommended(
        App\Helpers\Format::slugify($request-&gt;city)
    );

    if ($response-&gt;error) {
        return redirect()-&gt;back()-&gt;withErrors([
            'city' =&gt; $response-&gt;error
        ]);
    }

    return back()-&gt;with([
        'city' =&gt; $response-&gt;city ?? null, 
        'condition' =&gt; $response-&gt;current_weather ?? null,  
        'products' =&gt; $response-&gt;recommended_products ?? null, 
    ]);
}


Helper:

public static function slugify($value)
{
    return Illuminate\Support\Str::slug(
        iconv('UTF-8', 'ISO-8859-1//TRANSLIT//IGNORE', $value),
        '-'
    );
}


(None of the code above is tested)