<pre class="prettyprint lang-js">window.location.href = "http://itsolutionstuff.com";</pre>
In this post we have to learn hoe to add a multiple location marker in google map.
add following code for add multiple location marker.
<img width="100%" style="border:2px solid cadetblue" src="/upload/Google map.png">
<strong>Add Google map canvas HTML code</strong>
<pre class="prettyprint lang-html">
<div id="map_canvas" class="mapping"></div>
<strong>Add Google map canvas CSS code</strong>
<pre class="prettyprint lang-css">
In this post i will show you how to export or download pdf file from database table by maatwebsite. maatwebsite packages throught you can easily generate pdf file. so now i show you simple example of items table data, you can donwload in pdf formate. In following few step you can implement export both function in your project. we have to also need to use dompdf package for pdf generater. let's follow step.
<strong class="step">Step 1: Installation</strong>
Open your composer.json file and add bellow line in required package.
When you are working on laravel projects and you need to use mysql function in where clause then you can easily use that using DB::raw() and whereRaw(). In this example you can show how to i use mysql function in where clause. In this example i want to compare with year of created_at field but not whole date, that's whay i use mysql function Year(), this function will return only year from timestamp and compare with given value. I add two example of how to use sql function in where cause. let's See both example.
<strong class="example">Example 1:</strong>
<pre class="prettyprint lang-sql">
Whenever you need to get nearest posts from lat and long and if you are working on laravel query builder. then you can get distance easily using DB::raw(), so you can learn from following example how to get nearest value from mysql laravel.
<pre class="prettyprint lang-php">
$lat = 1;
$lon = 1;
,DB::raw("6371 * acos(cos(radians(" . $lat . "))
* cos(radians(posts.lon) - radians(" . $lon . "))
+ sin(radians(" .$lat. "))
* sin(radians(posts.lat))) AS distance"))