How to show selected value from database in dropdown using Laravel?

后端 未结 2 999
野趣味
野趣味 2021-01-06 17:37

I want to show selected value from database into dropdown list on page load.

My controller index function is :

public function index()
{ 
 $country_d         


        
2条回答
  •  有刺的猬
    2021-01-06 18:21

    @Sarita Sharma show the error(s). Maybe then anyone help you to resolve this problem. Show data in colections in controler - use dd e.g.

    dd($country_data);
    dd($profile_data);
    

    Do you want to display the country in the view with the appropriate Height value from profile_data?

    Ps. How to put the code, please use the formatting code - put the code in `` and use camelCase in value name (maintaining good PSR-1 practice) - it is easier to read code.

提交回复
热议问题