I fetch data using vue.js into my view, so I want to pass parameters via vue.js to this route name. Like this:
<img :src="{{ route('getImage', image.path) }}" />
I've tried various approaches but without success:
<img src="{{ route('getImage', :image.path) }}" />
<img src="{{ route('getImage', @{{ image.path }} ) }}" />
<img src="{{ route('getImage', '@{{ image.path }}' ) }}" />
The basic method that works
<img :src="'/img/'+image.path" />
The controller:
public function getImage($filename, $params){ }
I want to pass more than one parameter to this route. Please any ideas.
Update: The question is already posted here but without solutions: Link to a route with a parameter of Vue.js