FaCuZ / laravel-theme

Theme and asset managing for laravel
MIT License
138 stars 44 forks source link

External css or js? #41

Open KatiaSishost opened 2 years ago

KatiaSishost commented 2 years ago

How can add a external css or js like:

usmaneshop commented 2 years ago

You can add external or internal both type files in this way

in your theme config file: 'asset' => function($asset) { // Theme internal assets example $asset->themePath()->add([ ['style', [ 'css/style.css', 'css/style2.css' ]], ['script', [ 'js/script.js', 'js/script2.js' ]] ]); // external assets example $asset->add([ ['externalcss', [ '//cdnjs.cloudflare.com/ajax/libs/backbone.css', '//cdnjs.cloudflare.com/ajax/libs/backbone2.css' ]], ['externaljs', [ '//cdnjs.cloudflare.com/ajax/libs/backbone.js', '//cdnjs.cloudflare.com/ajax/libs/backbone2.js' ]], ]);

KatiaSishost commented 2 years ago

ohh thanks you!