动态填充laravel drodpown

时间:2017-03-23 05:28:00

标签: mysql laravel-5.4

我想做一个动态填充的laravel下拉菜单...我试图从过去3天开始这样做..但我不能......我不知道我错在哪里。每次我得到了不同的错误..

现在我在FileViewFinder.php第137行中遇到此错误InvalidArgumentException:找不到View [RegisterController.getusertype]。

我想从名为user_type..i的表中获取值,该表中有两列是id,类型为...

public function getusertype() {
    $usertype = \DB::table('user_type')->pluck('type', 'id');
    //print_r($usertype);
    return \View('RegisterController.getusertype')->with('user_type', $usertype);

}

这是我的观点:

<div class="form-group">
                        {!! Form::label('Link Category') !!}<br />
                        {!! Form::select('usertype',
                             $usertype,
                                null,
                                ['class' => 'form-control']) !!}
                    </div>

任何人都可以帮助我..请...

0 个答案:

没有答案