Latest Post




How to get hours difference between two dates in laravel?

How to get hours difference between two dates in laravel?

Whenever you need to get difference between two dates in hours in laravel 5 then you can get easily using Carbon. Laravel by default provide Carbon class. Carbon class throught you can calculate difference between two dates in hours. In Following example you can see, we have a two dates, first $to .....

By Hardik Savani | February 13, 2016 | Category : Laravel

How to add prefix in each key of PHP Array?

How to add prefix in each key of PHP Array?

Whenever you require to add one character or more to each and every key of array then most of the people would like prefer add key using for loop or foreach loop. But we can do this without using any kind of loop. using array_combine(), array_keys() and array_map() through we can add prefix on each .....

By Hardik Savani | February 13, 2016 | Category : PHP


How to get minimum key value of array in PHP?

How to get minimum key value of array in PHP?

Sometimes, you need to get minimum key value of your array but you try to get with loop and any function etc, but in bellow example you can see we can get smallest key value from our php array by using min() and array_keys(). So, let's try to use in your code this way: <strong>Example:</strong> <pr.....

By Hardik Savani | February 12, 2016 | Category : PHP

How to store all record in laravel 5 Cache

How to store all record in laravel 5 Cache

if you are work with large application which depend on large query and required large number of record at that time your application performence littel bit down. that problem overcome with laravel Cache functionality. Laravel Cache provide to you store your large query in cache so your application .....

By Hardik Savani | February 11, 2016 | Category : Laravel

How to set scroll to bottom in jquery?

How to set scroll to bottom in jquery?

Sometimes, we need to set scroll bottom as default by using jquery, in bellow example you can see i use scrollHeight for get the total height of scroll class div with scroll, and at last i use animate with scrollTop attribute and set bottom, So Basically when your page will load then automatically s.....

By Hardik Savani | February 11, 2016 | Category : PHP HTML jQuery