方法注入如何在Laravel 5(我的意思是实现)中工作,我可以在自定义方法中注入参数,而不仅仅是在控制器操作中吗?
我的问题是如何运行sequelize用ES6编写的迁移/种子?
我尝试了babel-node,但出现了奇怪的错误
命令
node_modules/babel-cli/lib/babel-node.js node_modules/sequelize-cli/bin/sequelize db:seed
Run Code Online (Sandbox Code Playgroud)
错误
node_modules/babel-cli/lib/babel-node.js: line 1: /Applications: is a directory
node_modules/babel-cli/lib/babel-node.js: line 3: /Applications: is a directory
node_modules/babel-cli/lib/babel-node.js: line 4: 127.0.0.1: command not found
node_modules/babel-cli/lib/babel-node.js: line 5: syntax error near unexpected token `('
node_modules/babel-cli/lib/babel-node.js: line 5: ` * when found, before invoking the "real" _babel-node(1) executable.'
Run Code Online (Sandbox Code Playgroud) babeljs ×1
ecmascript-6 ×1
javascript ×1
laravel ×1
laravel-5 ×1
node.js ×1
php ×1
sequelize.js ×1