I have two function in my controller and service. I want to call a function in service. Here is my code :
Controller:
public function findNeighborhoodGet(): array
{
$regionCenter = Request::get('region_center');
$distanceService = \App::make('App\web\one\Infrastructure\Service\Google\Map');
try {
$userPoint = $distanceService->getOriginPoint($regionCenter);
}
.
.
.
return $result
}
my service (Map.php) :
public function getOriginPoint(string $origin):Point
{
dd($origin);
return $this->getPointObject($origin);
}
Actually , I get an error :
A non well formed numeric value encountered
at this line: public function getOriginPoint(string $origin):Point
How to solve it?
$regionCenter?