I can think of many ways to do this, but everything depends on what the system requires, image confidentiality, etc.
// Ruta
Route::get('images/{filename}', 'ImagenesController@imagen'); // Deberias de usar un middelware '->middleware('auth')'
// controlador
public function imagen($slug)
{
$path = storage_path() . '/employees/' . $slug .'jpg'; // Podés poner cualquier ubicacion que quieras dentro del storage
if(!File::exists($path)) abort(404); // Si el archivo no existe
$file = File::get($path);
$type = File::mimeType($path);
$response = Response::make($file, 200);
$response->header("Content-Type", $type);
return $response;
}
// en el componente
<template>
<p class="lead"><img src="'/imagen/${this.employee.slug}'" width="50%" ></p>
</template>
Another option may be to convert the image to base64 in the controller and return a string and you can call it from the component using ajax
methods: {
getImage(slug) {
var imagen = ''
axios.get('/imagen/${this.employee.slug}')
.then(function(response) {
imagen = response.data
})
.catch(function(error) {
fail(error)
})
return imagen
}
}