Laravel-Backpack / demo

A working demo of Laravel with all Backpack packages installed.
http://backpackforlaravel.com
Other
323 stars 166 forks source link

Demo doesn't have GOOGLE_PLACES_KEY affecting "address_google" #525

Closed karandatwani92 closed 1 year ago

karandatwani92 commented 1 year ago

The demo doesn't have GOOGLE_PLACES_KEY.

Thus address_google & google_map field & columns are missing

if (env('GOOGLE_PLACES_KEY')) {
            $fields[] = [   // Address_google
                'name'          => 'address_google',
                'label'         => 'Address_google '.backpack_pro_badge(),
                'type'          => 'address_google',
                'fake'          => true,
                'store_as_json' => true,
                'tab'           => 'Time and space',
            ];
        }

if (env('GOOGLE_PLACES_KEY')) {
            $this->crud->addField([   // Address_google
                'name'          => 'address_google',
                'label'         => 'Address_google '.backpack_pro_badge(),
                'type'          => 'address_google',
                'fake'          => true,
                'store_as_json' => true,
                'tab'           => 'Time and space',
            ]);

            $this->crud->addField([
                'name'    => 'location',
                'label'   => 'Google_map '.backpack_pro_badge(),
                'type'    => 'google_map',
                'fake'    => true,
                'tab'     => 'Time and space',
            ]);
        }
tabacitu commented 1 year ago

Yup - that is intentional. We cannot let users use our API key, as it could cost us. And leaking the API key would open it up to abuse.