I got a question using laravel, I am trying to call a function and passing some parameters along with it using the {{ route }} method something along these lines here:
<img src="{{route('cacheImage', ['general', 'mini-logo.png']) }}" />
My route in my web.php file looks like this:
Route::get('/cache/images', ['uses'=>'HomeController@cache_image','as'=>'cacheImage']);
As a result, I am getting something like this here when the page loads in my img src:
http://localhost:8000/cache/images?general&mini-logo.png
But this is not what I want, what I would like is to have something along these lines here in my img src:
http://localhost:8000/cache/images/general/mini-logo.png
At the same time I want to call the cacheImage function in my controller and pass it both parameters, which are "general", and "mini-logo.png"
How do I achieve this? Can someone give me an example?