php - Laravel Jetstream 安装 Bootstrap 和 Jquery
问题描述
我已经在我的 Laravel 8 项目中安装了 Jetstream 和 Livewire。但我不知道如何将 JQuery 和 Bootstrap 包含到我的项目中。我怎样才能做到这一点?
编辑: Bootstrap 部分已理解,但仍无法安装 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。
解决方案
Jetstream 不支持 Bootstrap 和 jQuery - 这是有意为之,如本Github 问题中所述。
有一个包可以为 Jetstream 带来对 Bootstrap 的支持:https ://github.com/nascent-africa/jetstrap
jQuery 可以通过npm install jquery
和安装required
在你的app.js
.
推荐阅读
- sql - 有多少不同的产品有一个市场 SQL
- elasticsearch - Spring Data Elasticsearch 自动重新连接
- python - pandas drop 函数提供更多行
- c - SAMBA - 如何获取客户端IP
- r - 如果文件名的一部分匹配,如何匹配来自两个不同文件夹的两个文件
- python - 使用 Tensorflow 数据集 API 处理时间序列,以批量输入 LSTM
- makefile - Makefile 配方语法错误中的负 glob
- c++ - fstream .txt 并将其放入一个字符数组中以与另一个字符串进行比较
- python - 试图修复按钮的位置
- r - 计算多列,忽略 NA