【发布时间】:2021-05-02 08:30:30
【问题描述】:
我已经在我的 Laravel 8 项目中安装了 Jetstream 和 Livewire。但我不知道如何将 JQuery 和 Bootstrap 包含到我的项目中。我该怎么做?
编辑:Bootstrap 部分已理解,但仍无法安装 Jquery。
JQUERY 部分
正如@codedge 所说,我尝试在我的项目文件夹和其他地方运行npm require jquery 命令,它给了我这个输出:
Usage: npm <command>
where <command> is one of:
access, adduser, audit, bin, bugs, c, cache, ci, cit,
clean-install, clean-install-test, completion, config,
create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
edit, explore, fund, get, help, help-search, hook, i, init,
install, install-ci-test, install-test, it, link, list, ln,
login, logout, ls, org, outdated, owner, pack, ping, prefix,
profile, prune, publish, rb, rebuild, repo, restart, root,
run, run-script, s, se, search, set, shrinkwrap, star,
stars, start, stop, t, team, test, token, tst, un,
uninstall, unpublish, unstar, up, update, v, version, view,
whoami
npm <command> -h quick help on <command>
npm -l display full usage info
npm help <term> search for help on <term>
npm help npm involved overview
Specify configs in the ini-formatted file:
C:\Users\YARKIN\.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config
npm@6.14.10 D:\nodejs\node_modules\npm
Did you mean this?
rebuild
EDIT-2:我无法将 Jquery 添加到我的 public\js\app.js 中,尽管我已经安装并需要它 resources\js\app.js。
【问题讨论】:
-
这能回答你的问题吗? Laravel 8 JetStream Bootstrap 4。如果你更喜欢视觉学习,还有this video。
-
@Unflux 谢谢先生/女士!
标签: php laravel twitter-bootstrap jetstream