Latest Post

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 variable and second one $from variable. Carbon class diffInhours function using you can get difference between two dates. I hope you will find your solution. <strong>Example:</strong> <pre class="language-php"> $to = \Carbon\Carbon::createFromFormat('Y-m-d H:s:i', '2015-5-5 3:30:34'); $from = \Carb.....

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

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 key of array, In Bellow example you can see how to use both function together and add faster way to add prefix of every item key: <strong>Example:</strong> <pre class="language-php"> $myArray = ['0'=>'Hi','1'=>'Hello','2'=>'Hey']; $myNewArray = array_combine( array_map(function($key){ return 'a.....

By Hardik Savani | February 13, 2016 | | 2883 Viewer | Category : 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> <pre class="language-php"> $myArray = ['2'=>'Hey','4'=>'Hello','1'=>'Hi','3'=>'GH']; $new_key = min(array_keys($myArray)); $new_val = $myArray[$new_key]; print_r($new_val); </pre>

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

How to store all record in laravel5 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 performence improve. first of all you must write <stong>"use Cache"</strong> keyword on top of the your class Here is an example using Laravel’s Fluent Query Builder: <pre class="language-php"> $users = DB::table('order') ->orderBy('price', 'desc') ->take(10) ->.....

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

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 scroll as bottom. <strong>Example:</strong> <pre class="code language-html"> <html lang="en"> <head> <title>Scroll Down bottom</title> <script src=""></script> </head> <body> <div cl.....

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

KCFinder Special Query Builder DATE_SUB Ionic framework dompdf Tutorial stevebauman/location composer package MySQL Subquery API Mail Chart preg_match Opencart maatwebsite roumen/sitemap clipboard.js Index DB::raw() CSS lowercase Technology basename() Event Scout Package Billing INTERVAL thomaswelton/laravel-gravatar mysqld.sock Null Manual split Master Pagination glob Bootbox.js Module Data tagsinput.js Laravel 5.3 Loading xoxco tags input Payment Gateway google recaptcha code Linux yajra/laravel-datatables-oracle Pull Search Where In Query Contact US Form laravel-elixir PingPong Key Constraint Image Upload Highlight JS jquery.lazyload.js ngclipboard.js Artisan Command Language array_map Dialog box HTML to PDF datatables Behance API validator.js Form Validation Resize Image Laravel 5 RSS Base URL Rewrite Download Bitbucket Paypal Payment Gateway View Object Current Key Loop timestamps Express Typeahead JS Count clockface plugin typed.js plugin Windows Multiple Chosen JS IP Timepicker Confirm Box pngquant Log DB milon/barcode auth() Namespace apache2 marker Effect FadeOut Laravel Eloquent str_replace First Snippet Parsley strtolower Variable Now league/flysystem-dropbox Character Composer Twitter Bootstrap Parameters Gravatar Image chmod Field Configuration Link Exists Laravel 5.4 word-wrap Switchery JS Artisan PHP artisan Image Source Code oauth Strip Tags Gmail Cordova Sort orderBy Notification Links Number Bootstrap-lightbox Plugin GuzzleHttp Codeigniter 3 Permission pop() Request CURL Apache Collapse filter_var Top Jquery Dialog Box ServiceProvider Cross