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 | | 3456 Viewer | Category : PHP Laravel
READ MORE

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 | | 70169 Viewer | Category : PHP Laravel AngularJS
READ MORE

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 | | 2174 Viewer | Category : Laravel
READ MORE

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 | | 2588 Viewer | Category : PHP
READ MORE

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 | | 524 Viewer | Category : PHP
READ MORE


pngquant Highchart Sendgrid auth() Laravel Eloquent Attribute MassAssignmentException Animation DB Statement slice() HTML Mysql Concat length Tooltip DB::raw() Attr npm JWT Current Page SweetAlert Plugin Select Query Zip ACL Where In Query Calculate XML Socket.io Stripe Download Request Twitter Bootstrap bplist-parser Ionic framework Jquery Modal Controller CORS Toggle Laravel 5.3 API Mail tagsinput.js Div Socialite RAND() mod_rewrite parse ajaxStart FadeOut Query Builder ServiceProvider whitespace Email Verification Accordion 404 error page Add Reset Command Magento jquery.lazyload.js screenshotmachine.com API Google Map DATEDIFF() Facebook API Jquery UI Elasticsearch Schema gulp orderBy Codeigniter 3 Old Authentication Website word-wrap Tracking Scroll Server Object Localization Linux Dynamic Dependant Dropdown basename() Master PHPExcel Control Recursive Segment Link Artisan Mailchimp API Ip Address Generate Route toSql throttle Nodejs Log Modal chumper/zipper socket PHP artisan thomaswelton/laravel-gravatar WHERE Query Delete laravel-elixir PostgreSQL AngularJS TrustAsHTML Filter str_random() Image mysqld.sock Email AngularJS Demo Instagram API Remove Chosen JS Message Redis stevebauman/location composer package thujohn/twitter package Snippet Links Controluser Environment QR Code Base URL Where Not In Query Cache xoxco tags input String Library Resize Image Function mac Botdetect Captcha HTML to PDF Components & Slots Node JS Linkedin API Subscription Particular Laravel Backup Count Vue.JS Import Bootstrap maxlength plugin Carbon Interface array_change_key_case php.ini