jeudi 25 août 2016

Adding multiple values to Laravel Marker()

I'm trying to out put all my customers on a Google map by doing a foreach statement but I get the error

syntax error, unexpected 'foreach' (T_FOREACH)

My function

public function index()
    {
        $customers = Customer::where('CUPOSTCODE','<>','')->take(10)->get();

        Mapper::map(53.381128999999990000, -1.470085000000040000)
        foreach($customers as $c){
            ->marker($c->SL_accounts2->CU_USERCHAR1, $c->SL_accounts2->CU_USERCHAR2);
        }

        return view('management.maps');
    }



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire