小编ser*_*ioo的帖子

脚本“npm run dev”和“npm run watch”有什么用?

我在VUE是新和文档中说,每次我创建一个组件的时间我要运行npm run devnpm run watch。但不知道他们的目的是什么?有人能帮我吗?

npm vue.js

10
推荐指数
2
解决办法
3万
查看次数

import js file from public folder in a vue component (Laravel)

I need to import a file "js" from folder "public" in a vue component.

my Vue component:

<template>
  <div>
    <h2>Hello</h2>
  </div>
</template>
<script>

   import {myplugin} from "/public/vendor/jquery/jquery.min.js";
   export default {
      name: "pageone"
   }
</script>
Run Code Online (Sandbox Code Playgroud)

but i receive an error in compiling phase, can someone help me?

laravel ecmascript-6 webpack vue.js laravel-mix

5
推荐指数
1
解决办法
1万
查看次数

语法错误,意外的'__data'(T_STRING),期望的','或')'(查看:C:\ xampp \ htdocs \ boxe \ resources \ views \ utenteShow.blade.php)

我需要解决此问题,当我按下“记录”按钮时,该程序应使我进入刚注册的用户页面,但出现此错误:

错误:

语法错误,意外的'__data'(T_STRING),期望的','或')'(查看:C:\ xampp \ htdocs \ boxe \ resources \ views \ utenteShow.blade.php)

路线:

Route::post('/registrazione/store','RegistrazioniController@store')->name('registrazione.store');

Route::get('/registrazione/{utente}','RegistrazioniController@show')->name('utente.show');
Run Code Online (Sandbox Code Playgroud)

控制器:

public function store(tabella_utenti $utente)
{
    $this->validate (request(),[
        'email' => 'required',
        'password' => 'required',
        'NomeUtente' => 'required'
    ]);
    $utente=tabella_utenti::create(request(['email','password','NomeUtente']));

    //comando che gli passa l'id
    $utente=tabella_utenti::all();
    $utenteId=$utente->id;
    return redirect(route('utente.show',compact('utenteId')));

}

public function show(tabella_utenti $utente)
{
    return view('utenteShow',compact('utente'));
}
Run Code Online (Sandbox Code Playgroud)

视图:

@extends('layouts.layout)

@section('body')
    <h1>Pagina Utente</h1>

        @foreach($utente as $value)
        Nome:{{$value->NomeUtente}}

        @endforeach

@endsection
Run Code Online (Sandbox Code Playgroud)

php

0
推荐指数
1
解决办法
3809
查看次数

标签 统计

vue.js ×2

ecmascript-6 ×1

laravel ×1

laravel-mix ×1

npm ×1

php ×1

webpack ×1