Skip to content

Commit

Permalink
Merge pull request #67 from atriatech/v2
Browse files Browse the repository at this point in the history
bug fix
  • Loading branch information
RezDev94 authored Dec 21, 2021
2 parents f41e9ad + ff4753d commit dc1010d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MediaServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public function boot()
Blade::directive('atriatech_media', function ($file) {
$file = trim($file, "'");
if ($file == 'css') {
return '<?php $css_media_selector = asset(trim(config(\'atriatech_media.url_prefix\'), \'/\') . \'/\' . \'atriatech/media/css/media-selector.css\'); echo \'<link href="\' . $css_media_selector . \'?ver=\' . random(10000000, 99999999) . \'" rel="stylesheet" type="text/css"/>\'; ?>';
return '<?php $css_media_selector = asset(trim(config(\'atriatech_media.url_prefix\'), \'/\') . \'/\' . \'atriatech/media/css/media-selector.css\'); echo \'<link href="\' . $css_media_selector . \'?ver=\' . rand(10000000, 99999999) . \'" rel="stylesheet" type="text/css"/>\'; ?>';
} else if ($file == 'js') {
return '<?php $js_media_selector = asset(trim(config(\'atriatech_media.url_prefix\'), \'/\') . \'/\' . \'atriatech/media/js/media-selector.js\'); echo \'<script src="\' . route(\'atriatech_media_router\') . \'"></script><script src="\' . route(\'atriatech_media_config\') . \'"></script><script src="\' . $js_media_selector . \'?ver=\' . random(10000000, 99999999) . \'"></script>\'; ?>';
return '<?php $js_media_selector = asset(trim(config(\'atriatech_media.url_prefix\'), \'/\') . \'/\' . \'atriatech/media/js/media-selector.js\'); echo \'<script src="\' . route(\'atriatech_media_router\') . \'"></script><script src="\' . route(\'atriatech_media_config\') . \'"></script><script src="\' . $js_media_selector . \'?ver=\' . rand(10000000, 99999999) . \'"></script>\'; ?>';
} else {
return '';
}
Expand Down

0 comments on commit dc1010d

Please sign in to comment.