need you all help in this. I don’t know why will getting this “Property [method] does not exist on the Eloquent builder instance.”
Controller.php
public function manualTransferConfirm()
{
$track = session()->get('Track');
$data = Transfer::with('provider')->where('status', 0)->where('trx', $track)->first();
if (!$data) {
return to_route(providerRedirectUrl());
}
if ($data->provider_id > 999) {
$pageTitle = 'Transfer Confirm';
$method = $data->providerCurrency();
$provider = $method->method;
return view($this->activeTemplate . providerView('manual_confirmp',true), compact('data', 'pageTitle', 'method', 'provider'));
}
abort(404);
}
Models/ProviderCurrency.php
public function method()
{
return $this->belongsTo(Provider::class, 'provider_id', 'code');
}