In Laravel, you can call a REST API using the HTTP client provided by the framework. Laravel's HTTP client allows you to make GET, POST, PUT, DELETE, and other HTTP requests to external APIs. Here's how you can call a REST API in Laravel: Install Laravel (if not already done): If you haven't already set up a Laravel project, you can create one using Composer by running the following command: composer create - project -- prefer - dist laravel / laravel project - name Create a Controller (optional): You can create a controller to encapsulate the API call logic, but this step is not strictly necessary. You can also make API calls directly from your routes or other parts of your application. To create a controller, run the following command: php artisan make: controller ApiController Make an API Request: You can make API requests using Laravel's HTTP client, which is a fluent, expressive interface for making HTTP requests. Here's how you can make a simple GET request t...
How to fetch Latitude, Longitude from address and vice-versa(address from Latitude, Longitude) using Google Geo coder SDK in android| Kotlin
In this Android development related article, you will get a simple solution that, how to get address using Latitude, Longitude and vice-versa. i.e latitude, longitude from an address text. It is very easy and simple. Read full article and carefully follow all the steps. Here we use google Geocoder SDK. Okay, first we create an android project in kotlin and create an Activity say MainActivity.kt. Use the below code- Function get Latitude, Longitude from Address- fun getLatLngFromAddress (context: Context, mAddress: String): String { val coder = Geocoder(context) lateinit var address: List<Address> try { address = coder.getFromLocationName(mAddress, 5 ) if (address == null ) { return "Fail to find Lat,Lng" } val location = address[ 0 ] return " Latitude: ${location.latitude}\n Longitude: ${location.longitude}" } catch (e: Exception...