Skip to content

Argument 1 passed to Geocoder\Laravel\ProviderAndDumperAggregator::getArguments() must be of the type array, string given, #154

Closed
@darkcast64

Description

@darkcast64

General Information

GeocoderLaravel Version: 4.1
Laravel Version: 5.8
PHP Version: 7.2
Operating System and Version: windows 10

Issue Description

i have this error when i try to go to my view.

i have installer toinOu/geocoder-laravel

set geocoder.php like this :

use Geocoder\Provider\BingMaps\BingMaps;
use Geocoder\Provider\Chain\Chain;

use Ivory\HttpAdapter\CurlHttpAdapter;

return [
    'cache' => [

       
        'store' => null,

        

        'duration' => 9999999,
    ],

   
    'providers' => [
        Chain::class => [
            BingMaps::class => [
                'en-US',
                env('mybingkey'),
        ],
    ],

   
    'adapter'  => CurlHttpAdapter::class,

   
    'reader' => null,

]
];

set up my controller like this :

namespace App\Http\Controllers;


use Geocoder\Provider\Chain\Chain;
use Illuminate\Http\Request;


class GeocoderController extends Controller
{
    public function index()
    {

        $geocode = app('geocoder')->geocode(['Los Angeles, CA'])->using('BingMaps')->get();
        return $geocode;
    }


}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions