i have a database table that store list of country,now am trying to get the list of country in a dropdown form,but is not working, maybe am missing something.this is my controller code
` public function details($id){
//fetch post data
//$post = Post::find($id);
$country_options = Country::pluck('country', 'id');
$country_options = DB::table('regions')->orderBy('country', 'asc')->pluck('country','id');
//pass posts data to view and load list view
return view('dashboard')->with('country_options',$country_options);
}`
and the code that echo the dropdown in my form look like this ` '
@foreach($countries as $country)'+
'<option value="{{ $country->id }}"> {{ $country->country }}</option>'+
'@endforeach'+`
and my route looks like this
Route::get('/Business', 'BusinessController@details')->name('Business');
but i keep getting this error message
Undefined variable: countries (View: C:\xampp\htdocs
have made research but could not fine the solution. any help would be appreciated with proper documentation/explanation.thanks