假如_丶

1920 经验值

e...复制错误了。。。

function commentStore()
{
    alert(1);
}

我定义 commentStore 了...
// app.js
require('./plugins/forms.fun');

// forms.fun.js
function text()
{
    alert(1);
}

// blade
<input class="btn btn-default btn-sm" type="submit" onclick="text();" value="提交">

错误:Uncaught ReferenceError: commentStore is not defined at <anonymous>:1:1

上传头像的弹层居然关闭不了,还不报错,什么鬼。。。

额。。。$episode->tags->pluck('name') 怎么直接给我信息啊...

我也感觉代码没啥问题就是,他返回给我的是数组,["测试用户组"],不是 测试用户组
也就是他返回的这个样子array的格式 ["id值"],不是直接给我值。。。

// User Model 如下:
public function tags()
{
        return $this->hasMany(Tag::class,'id', 'tag_id');
}

// view 如下

@foreach($users as $user)

        $user->tags->pluck('name')

@endforeach

结果很疑惑,返回时 ['测试用户组'],我想pluck的结果 就是测试用户不是['测试用户组'],是我的写的方式有错吗?求指点。。。

哈哈哈哈哈哈哈~!是的。。

我的NAME打出来之后 首字母是大写的什么情况...

<!-- $VALUE$ Field -->
<div class="form-group { $errors->has('$VALUE$') ? ' has-error' : '' }">
    <label for="$VALUE$">$NAME$</label>
    <input type="text" class="form-control" id="$VALUE$" placeholder="$VALUE$">
    @if ($errors->has('$VALUE$'))
        <span class="help-block">
            <strong>{ $errors->first('$VALUE$') }</strong>
        </span>
    @endif
</div>
////////////////////
<!-- Name Field -->
<div class="form-group { $errors->has('Name') ? ' has-error' : '' }">
    <label for="Name">name</label>
    <input type="text" class="form-control" id="Name" placeholder="Name">
    @if ($errors->has('Name'))
        <span class="help-block">
            <strong>{ $errors->first('Name') }</strong>
        </span>
    @endif
</div>   

如题:npm 下载下来的 node_modules 文件也需要传到服务器上吗?

npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "watch"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! @ watch: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ watch script 'cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\PhpStudy\WWW\phpjr\npm-debug.log

这个是错误信息,如果有想错误的人可以看下...我用cnpm重新cnpm install,这个问题就搞定了...

https://github.com/cnpm/cnpm

// 在项目根目录先执行这段代码
npm install -g cnpm --registry=https://registry.npm.taobao.org
// 然后再执行这段代码
cnpm install

OK,我们可以愉快的尝试L5.4的mix了...