I really don't know, but there is perhaps a relationship with the necessity for some applications that have the assets accessible from another URL ?
Feb 11, 2023
9
Level 75
Laravel 10 asset helper [Solved]
In ver 9 I can use asset helper without the asset_url config like:
<link href="<?php echo asset('assets/css/dog/style.css'); ?>" rel="stylesheet">
But in version 10 it's not getting the correct url without adding:
'asset_url' => 'http://localhost/laravel10/',
To config.
So ver 9 auto adds http://localhost/laravel913/ which you can see in view source.
Ver 10 using asset helper only gets relative path.
- v9 http://localhost/laravel913/assets/css/dog/style.css
- v10 assets/css/dog/style.css
I looked all over for any changes to asset helper, but couldn't find any. Any ideas why the difference?
Level 63
@jlrdw Yes exactly, I also compared both versions.
Perhaps it's an issue that will be rectified.
1 like
Please or to participate in this conversation.