我正在使用laravel 5.2
Package.json
{
"private": true,
"scripts": {
"prod": "gulp --production",
"dev": "gulp watch"
},
"devDependencies": {
"bootstrap-sass": "^3.0.0",
"gulp": "^3.9.1",
"laravel-elixir": "^5.0.0",
"laravel-elixir-webpack": "^1.0.1",
"laravel-elixir-webpack-official": "^1.0.2",
"laravel-mix": "^2.1.14",
"lodash": "^4.16.2",
"vue": "^2.0.1",
"vue-resource": "^1.0.3",
"webpack": "^2.7.0"
},
"dependencies": {
"get-ssl-certificate": "^2.1.2",
"laravel-elixir-webpack-official": "^1.0.2",
"vuedraggable": "^2.16.0"
}
}
我尝试了firefox和google chrome扩展程序,都说它已禁用 这是限制此行的行
devtools: process.env.NODE_ENV !== 'production'
出于我的理解,这一定不能发生。
我到现在为止采取的步骤:
1- remove node_models使用npm install再次安装
2-用Vuejs.org提供的版本替换vue文件
图标是彩色的,但是没有Veo devtool,当我在标题的顶部使用CDN时,会得到devtools! 是什么原因导致此冲突!我很困惑 谢谢你的帮助
答案 0 :(得分:0)
好吧,长话短说,造成的问题是因为它没有编译我的文件,而devmode在以前编译的版本中已关闭。 我试图在laravel 5.2上使用vue,遇到了许多问题,因此我决定安装 laravel 5.3 by:
<?php
if(isset($_POST['submit'])) {
global $wpdb;
$ordernumber = $_POST['ordernmbr'];
$orderfirstname = $_POST['firstname'];
$orderpostnumber = $_POST['postnmbr'];
// Sanitizing
$ordernumber = stripslashes_deep($ordernumber);
$orderfirstname = stripslashes_deep($orderfirstname);
$orderpostnumber = stripslashes_deep($orderpostnumber);
$sql = "SELECT * FROM wp_postmeta WHERE 'post_id' = %d";
$sql = $wpdb->prepare($sql, array($ordernumber));
$res = $wpdb->get_results($sql);
if ($res > 0) {
wp_redirect(admin_url('http://localhost/wordpress/index.php/shop/'));
die();
} else {
$error = "Not like this";
echo $error;
}
print_r($res);
}
?>
<?php
get_footer();
?>
}
之后,我执行了:
composer create-project --prefer-dist laravel/laravel myapp "5.3.0"
并开始安装依赖项和all,完成后,我测试了 gulp 命令以查看其编译是否成功。所以我将 package.json package-lock.json 和 gulpfile.js 从我的Laravel 5.3移到了laravel 5.2,再次运行npm install并全部完成!