laravel-theme icon indicating copy to clipboard operation
laravel-theme copied to clipboard

Add more than 1.css and 1.jss

Open KatiaSishost opened this issue 3 years ago • 1 comments

Hello i have in assets... style.css color.css and plugins.css... scripts.js and plugins.js

$asset->themePath()->add([ ['style', 'css/style.css'], ['script', 'js/scripts.js'] ]);

how can add to this?

KatiaSishost avatar Jan 17 '22 20:01 KatiaSishost

You can add external or internal both type multiple 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' ]], ]);

usmaneshop avatar Apr 01 '22 10:04 usmaneshop