Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Laravel 5.8 和 laravel-admin 管理员模板。现在在某些情况下,我只需要为管理员特定的控制器自定义 js 和 css 文件。如何在 laravel-admin 中添加这些 Js 和 css。
利用,
Admin::js('...your path here');
该路径是指公共目录。因此,如果public目录下有 js 文件,请使用'your_file_name.js'. 或者,如果您的 js 文件包含在public子目录中,请使用Admin::js('sub_directory/your_file.js')
public
'your_file_name.js'
Admin::js('sub_directory/your_file.js')