Latest Post

laravel 5 change date format using carbon example

Sometimes you require to change date format in your laravel app. we have to use Carbon class for change format in laravel, because it provide many date function for like change date formate, count diffrence between two dates in days etc. So, Basically i am going to show you change date format using Carbon. we will use createFromFormat() and format(), createFromFormat() will take two argument first give format of date and second one date and format() take one argument give formate as you want. you can see bellow example: <strong>Example:</strong> <pre class="language-php"> $date = date('Y-m-d H.....

By Hardik Savani | February 16, 2016 | | 8984 Viewer | Category : PHP Laravel

Laravel 5.2 and AngularJS CRUD with Search and Pagination Example.

Now i show you how to create CRUD(Create, Read, Update, Delete) using AngularJS and Laravel 5. In Following step by step you can create web application of create, edit, delete, lists, search with pagination of items modules. In this post through you can make simple crud, search and pagination module and easily use in your laravel project. I am going to show preview of items module that we will do using angularJS and Laravel 5.2. <strong>Preview</strong> <img src="/upload/laravel-angular.png" width="100%" style="border:2px solid cadetblue" /> <strong class="step">Step 1: Create items table an.....

By Hardik Savani | February 15, 2016 | | 167804 Viewer | Category : PHP Laravel AngularJS

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 | | 5730 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 | | 6071 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 | | 934 Viewer | Category : PHP

Record Mysql Concat php artisan serve Toggle Protection Controluser Data Commit Bootstrap Star Rating Plugin Column Repository Pattern Pagination Dropzone.js Permission ACL lowercase Controller Remove roumen/feed package Configuration Artisan Command Ip Address Blocked Subscription toSql Instagram API Amazon S3 ngclipboard.js Modular throttle setTimeout() Parsley Gmail Parameters Dropbox API select box search Segment Snippet View groupBy() GET Ajax Namespace Zoho mail DB Send Paypal Payment Gateway Image 500 error page Ajax Request Ubuntu 14.04 mod_rewrite Subscribe Particular Key Foreign Key select2.js Ionic framework Express LIKE Query array_combine Base URL phpword JSON clearbit API Effect Bootstrap Notify Plugin Laravel 5.4 - Markdown Mailables Middleware away() Redirect JWT meta http-equiv tag API Jquery Plugin Add Animate AngularJS Directive filter Inserted Id Strings ANDROID_HOME Server Remote toArray() Request Method Barcode yajra/laravel-datatables-oracle Terminal ID Where Not In Query Letter Laravel Links Botdetect Captcha Custom Linux Behance API Cordova Specific Connection Custom Command Directory MassAssignmentException Control Bitbucket Vue.JS chmod uppercase max_file_uploads Source Code PHP artisan Google API Components & Slots Google Map virtual host Bootstrap maxlength plugin Bootstrap Confirmation js plugin Exists ixudra/curl composer package gravatar Artisan Ubuntu tree view Input datatables upload_max_filesize Multiple enableQueryLog glob Tutorial array_map Sublime text 2 DB Statement DATE_SUB RSS Feed league/flysystem-dropbox filter_var phpmyadmin User colorpicker Global Variable Field Date Format Auth Calculate Excel tagsinput.js Top Object Location