Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addSelect 修改 addAutoComplete 的时候 creating获取不到值 #115

Open
tanhaitao opened this issue Sep 15, 2017 · 0 comments
Open
Labels

Comments

@tanhaitao
Copy link

tanhaitao commented Sep 15, 2017

 $edit->addSelect('storehouse_id', '入库仓库')->options(
             Storehouse::listStoreHouse()
        )->required();

input参数是

  "lego-form-storehouse_id" => "15"

修改成这个的时候:

$edit->addAutoComplete('storehouse_id', '入库仓库')
            ->match(function ($keyword) {
                return Storehouse::whereStatus(Storehouse::USEABLE_启用)
                    ->where('name', 'like', "%{$keyword}%")
                    ->take(20)
                    ->get()
                    ->pluck('name', 'id')
                    ->toArray();
            })
            ->default('')
            ->required();

input是这个参数

"lego-form-storehouse_id" => "13"
  "lego-form-storehouse_id-text" => "哇哈哈"
PurchaseBill::creating(function (PurchaseBill $purchaseBill) {
            dump(\Input::input());
            dd($purchaseBill);
        });

获取不到相应的值

@zhwei zhwei added the feature label Nov 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants