小编GTM*_*eor的帖子

Laravel 5.4验证规则 - 可选,但如果存在则经过验证;

我正在尝试通过表单创建用户更新验证,我传递的地方,例如'password'=> NULL,或'password'=>'newone';

我只是试图让它验证,如果它被传递为非null,没有,甚至"有时"工作:/

我试图验证为:

Validator::make(array('test'=>NULL), array('test'=> 'sometimes|required|min:6'))->validate();
Run Code Online (Sandbox Code Playgroud)

但它未能验证......:/ ANy帮助将不胜感激.

laravel laravel-5

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

Vue.js 2-组件上的$ forceUpdate()不会刷新计算的属性吗?

我不确定我是对还是错,但是所有的答案似乎都找到了如何为计算值更新dom ...

我有这个组成部分:

Vue.component('bpmn-groups', {
    props: ['groups', 'searchQuery'],
    template: '#bpmn-groups',
    computed: {
        filteredGroups: function () {
            var self = this;
            return this.groups.filter(function(group) {
                self.searchQuery = self.searchQuery || '';
                return _.includes( group.name.toLowerCase(), self.searchQuery.toLowerCase() );
            });
        }
    },
    methods: {
        clearFilter: function () {
            this.searchQuery = '';
        },
        deleteGroup: function(group) {
            Vue.http.delete('api/groups/'+group.id ).then(response => { // success callback
                var index = this.groups.indexOf(group); // remove the deleted group
                this.groups.splice(index, 1);
                this.$forceUpdate(); // force update of the filtered list?
                toastr.success('Schem? grup? <em>'+group.name+'</em> s?kmingai pašalinta.'); …
Run Code Online (Sandbox Code Playgroud)

vue.js

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

正确的方法来表示BPMN中一个任务的while循环?

BPMN中代表一个仅重定向到一个任务的简单while循环的正确方法是哪一种?

在此处输入图片说明

bpmn

6
推荐指数
1
解决办法
2112
查看次数

PHP Laravel 5.5集合变平并保留整数键?

我有以下数组:

$array = [
    '2' => ['3' => ['56' => '2'], '6' => ['48' => '2']],
    '4' => ['4' => ['433' => '2', '140' => '2'], '8' => ['421' => '2', '140' => '2']],
    '5' => ['5' => ['88' => '4', '87' => '2']]
];
Run Code Online (Sandbox Code Playgroud)

以下代码(拼合)应通过保留键返回,但不是吗?

collect($array)->flatten(1);
Run Code Online (Sandbox Code Playgroud)

应该给我

[
    '3' => ['56' => '2'],
    '6' => ['48' => '2'],
    '4' => ['433' => '2', '140' => '2'],
    '8' => ['421' => '2', '140' => '2'],
    '5' => ['88' => '4', …
Run Code Online (Sandbox Code Playgroud)

php flatten collect laravel

3
推荐指数
1
解决办法
2781
查看次数

标签 统计

laravel ×2

bpmn ×1

collect ×1

flatten ×1

laravel-5 ×1

php ×1

vue.js ×1