const path = require('path');
var webpack = require('webpack'),
ExtractTextPlugin = require("extract-text-webpack-plugin");
var nodeExternals = require('webpack-node-externals');
const CssEntryPlugin = require("css-entry-webpack-plugin");
module.exports = {
entry: {
index: './js/index.js',
product_details: './js/index.js',
signup: ['./js/signup.js','./js/index.js'],
signup_style: ['./css/signup.css']
},
output: {
path: path.resolve(__dirname, 'dist/js'),
filename: "[name].min.js"
},
externals: [nodeExternals()],
module: {
rules: [
{
test: /\.js/,
use: 'babel-loader',
exclude: /node_modules/,
},
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [{
loader: 'css-loader',
options: {
minimize: true,
}
}]
})
}
]
},
plugins: [
new ExtractTextPlugin('../css/[name].css') …Run Code Online (Sandbox Code Playgroud) 我有一列为 close_date,数据类型为时间戳。我想在 unix 时间戳中添加日期,例如 1556801668。我不知道如何在 Laravel 中做到这一点。
我想重命名 Laravel 中的外键。
这就是我创建它的方式:
Schema::create('holidays', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->integer('account_id')->nullable(false)->unsigned();
$table->date('holiday_date')->nullable(false);
});
if (Schema::hasTable('accounts')) {
Schema::table(
'holidays',
function (Blueprint $table) {
$table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
}
);
}
Run Code Online (Sandbox Code Playgroud)
现在,我想将 account_id 更改为engagement_id。怎么做?
以下是我的 Javascript 对象:
window.options = {
VAR1: VAL1,
VAR2: VAL2,
VA31: VAL3,
};
Run Code Online (Sandbox Code Playgroud)
我希望它(对象或数组)在.env文件中定义。我怎样才能做到这一点?
我已经在控制器file中编写了一个作为getAccess()的函数Appbundle/Controller/BackendController.php。
我想在Menu/Menubuilder.php文件中访问此控制器的方法。我怎样才能做到这一点?
菜单和Appbundle文件夹处于同一级别。