I got into trouble when the file was not found and that generated this:
[ommited machine IP address]
2019-05-23 15:12:24] local.ERROR: file_get_contents(): Peer certificate CN=`eco.***.pt' did not match expected CN=`193.*.*.*' (View: /var/www/clients/client3/web7/private/laravel/resources/views/layouts/default.blade.php) (View: /var/www/clients/client3/web7/private/laravel/resources/views/layouts/default.blade.php) {"exception":"[object] (ErrorException(code: 0): file_get_contents(): Peer certificate CN=`ecocampus.utad.pt' did not match expected CN=`193.*.*.*' (View: /var/www/clients/client3/web4/private/laravel/resources/views/layouts/default.blade.*) (View: /var/www/clients/client3/web4/private/laravel/resources/views/layouts/default.blade.php) at /var/www/clients/client3/web4/private/laravel/storage/framework/views/5202fd7b45c252baee2039b21032a54447b62494.php:106, ErrorException(code: 0): file_get_contents(): Peer certificate CN=`eco.***.pt' did not match expected CN=`193.*.*.*' (View: /var/www/clients/client3/web7/private/laravel/resources/views/layouts/default.blade.php) at /var/www/clients/client3/web4/private/laravel/storage/framework/views/5202fd7b45c252baee2039b21032a54447b62494.php:106, ErrorException(code: 0): file_get_contents(): Peer certificate CN=`eco.***.pt' did not match expected CN=`193.136.*.*' at /var/www/clients/client3/web4/private/laravel/storage/framework/views/5202fd7b45c252baee2039b21032a54447b62494.php:106)
The machine crashed with so many errors.
Is there anyway to avoid this kind of erros with the asset() function?
if you are in-lining the svg then you just need to get its contents. It does not matter if it is internal or external since everything is running in php at this point.