我可以在post方法表单中从数据库中获取数据吗?

I have duplicate databases and I want to fetch data from the secondary database, inside my Register form which has POST method.

I tried what I can do still stuck on it few days.

This is my register.blade where I want to fetch data :

{{ csrf_field() }}
@if($getTypes->count())
@foreach($getTypes as $getType)
  <option value="{{$getType->nameMn}}">
    {{$getType->nameMn}}
  </option>
@endforeach
@endif

Here is the controller :

public function getTypes(){
  $db = DB::connection('mysql2');
  $getTypes = $db->table('merchant_types')->get();

  return view('auth/register', ['getTypes'=>$getTypes]);
}
Route::post('register', 'MerchantController@getTypes');

And here goes the Route, I've tried post & get everything.

On my view blade this error is showing :

Undefined variable: getTypes"

You should use compact('getTypes') instead of ['getTypes'=>$getTypes], change Route::post to Route::get and then open it in browser, dd($getTypes) in view to see which type of object. I can not see what wrong.