Laravel5.4 about select drop-down box reading database data case
First, you need to make a select down box.
= = Top level category = @ foreach ($data as $d) {{$d-> cate_name}} @ endforeach
And then the background reads the data.
Public function create () {$data = Category::where ('cate_pid',0)-> get (); return view (' category/add',compact ('data'));}
It should be easy for everyone to understand! No explanation!