如何将Google Maps API密钥添加到env文件,然后从服务文件(如条带包或任何包)调用它?如您所知,Google Map API是像这样的JavaScript文件。
<script src="https://maps.googleapis.com/maps/api/js?**key=(call from services)&libraries=places&callback=initAutocomplete" async defer></script>
.env:
GOOGLE_KEY=mygooglekey
服务.php
'googlekey' => [ 'ApiKey' => env('GOOGLE_KEY') ],
斯蒂芬大帝