[英]How to set custom js file in Laravel admin template
I am using Laravel 5.8 with laravel-admin Template for admin.我正在使用 Laravel 5.8 和 laravel-admin 管理员模板。 Now in some situation i need custom js and css file only for admin specific controller.
现在在某些情况下,我需要自定义 js 和 css 文件仅用于管理员特定的 controller。 How to add these Js and css in laravel-admin.
如何在 laravel-admin 中添加这些 Js 和 css。
Use,利用,
Admin::js('...your path here');
The path refers to the public directory.该路径是指公共目录。 So, if you have a js file under
public
directory, use 'your_file_name.js'
.因此,如果您在
public
目录下有一个 js 文件,请使用'your_file_name.js'
。 Or if you had your js file containing in a public
subdirectory, use Admin::js('sub_directory/your_file.js')
或者,如果您的 js 文件包含在
public
子目录中,请使用Admin::js('sub_directory/your_file.js')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.