When adding an image as a voyager setting, rendering it on the page inside a img tag has the wrong url, it is just setting/month/asset name etc where as when voyager saves the image upon upload, it stores it in public/storage/setting etc.
I have tried changing 'url' => env('APP_URL').'/public/storage', but it still doesn't work
I had to update the url to the '/storage' for it to work for me in my review.
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => '/storage',
'visibility' => 'public',
],
Did it work doing what聽@fuzzyjared did?
I just had to move my project form a MAMP development environemtn into a Laradock environment. As I am using this project as an evaluation I decided not to migrate my existing databse and run "php artisan voyager:install --with-dummy".
This installed everything just fine but resulted int a symlink error.
I had not changed the filesystem config from my earlier post but did have to remove the created symlink and then run the symlink correction tool. Once this was saved the images were loading again without a symlink error.
I am only mentioning this as it would appear that this setting worked in two different development environment if not completely different systems.
Labels: possible bug
In config/voyager.php
'assets_path' => url('/public/vendor/tcg/voyager/assets') ==> did not worked while doing "php artisan"
'assets_path' => env('APP_URL').'/public/vendor/tcg/voyager/assets' ==> this is working :)
I believe you can use Voyager::image(setting('site.logo')) in last version. Please let me know if that doesn't work.
Thanx jatin its working for me.. :)
In config/voyager.php
'assets_path' => url('/public/vendor/tcg/voyager/assets') ==> did not worked while doing "php artisan"
'assets_path' => env('APP_URL').'/public/vendor/tcg/voyager/assets' ==> this is working :)
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Most helpful comment
I believe you can use
Voyager::image(setting('site.logo'))in last version. Please let me know if that doesn't work.