dope2008

4451 经验值

$data[][]='中国';
\Excel::create('模板', function ($excel) use ($data) {
            $excel->sheet('score', function ($sheet) use ($data) {
                $sheet->rows($data);
            });
})->download('csv');

导出csv是乱码的。但是导出xlsx又是正常的,为什么呢?

Laravel Excel 2.1.23

  \Excel::filter('chunk')->load('storage/app/xls/1.xlsx')->chunk(500, function ($results) {
            foreach ($results as $key => $row) {
                dd($row);
            }
        });

导入日期时,读取出来是整数,如果是日期加时间,读取出来是带小数的
有什么方法,

怎么样验证一个数组总数是不是100

有N个输入框。要求用户输入的总数是100

createMany 是一对多创新。
但是有没有方法是一对多更新的

这个方法不是视图才行吗?我的是API来的

我的URL是
/api/article/index?abc=1&def=2

Article::paginate(20)

"next_page_url": "/api/article/index?page=2"

怎么样把abc=1&def=2加回去??

出错内容

Cannot read property 'get' of undefined"

app.js

require('./bootstrap');
window.Vue = require('vue');
import VueRouter from 'vue-router';
import router from './routes';
import Vuex from 'vuex';
import App from './components/App';
Vue.use(VueRouter);
Vue.use(Vuex);
Vue.component('app', App);
const store = new Vuex.Store({
    state: {
        settings: []
    },
    mutations: {
        set_settings(state, data) {
            state.settings = data;
        }
    },
    actions: {
        getSettings(store) {
            console.log(1111);
            Vue.axios.get('/api/setting/index').then(response => {
                store.commit('set_settings', response.data.settings);
            })
        }
    }
});

Vue.axios.get 这个出错了吧

出错内容

Cannot read property 'get' of undefined"

app.js

require('./bootstrap');
window.Vue = require('vue');
import VueRouter from 'vue-router';
import router from './routes';
import Vuex from 'vuex';
import App from './components/App';
Vue.use(VueRouter);
Vue.use(Vuex);
Vue.component('app', App);
const store = new Vuex.Store({
    state: {
        settings: []
    },
    mutations: {
        set_settings(state, data) {
            state.settings = data;
        }
    },
    actions: {
        getSettings(store) {
            console.log(1111);
            Vue.axios.get('/api/setting/index').then(response => {
                store.commit('set_settings', response.data.settings);
            })
        }
    }
});