Latest Post

How to get months difference between two dates in laravel?

Whenever you need to get difference between two dates in months 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 months. In Following example you can see, we have a two dates, first $to variable and second one $from variable. Carbon class diffInMonths 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 = \C.....

By Hardik Savani | February 6, 2016 | | 1262 Viewer | Category : Laravel

How to get last inserted id in laravel 5?

Its very common need to get last insert id in programming field, if you are working on laravel framework and you want to fetch last created id, i mean max id, then you do easily.laravel provide method to get last inserted id. If you are working with DB::table() then you have to use insertGetId() for insert data into database. this function always return inserted record id(primary key).it is very simple way to get id, in following example you can see and undestand more: <strong>Example:</strong> <pre class="language-php"> public function getLastInsertedIdDB() { $id = DB::table('items')->inser.....

By Hardik Savani | February 6, 2016 | | 7648 Viewer | Category : Laravel

Select only one checkbox at a time using Jquery

If you need to select one checkbox at a time in multiple checkbox, i mean you want to allow anly one checkbox user can check then you can do easily using jquery. jquery prop() through you can give attribute value checked equel to true or false. if you have banch of checkbox like as example, and if you want to check checkbox at time one by using jquery then you can use this code. In following example use for you to do select at a time one. <strong>Example:</strong> <pre class="code language-html"> <html> <head> <title>Select only one checkbox at time</title> <scri.....

By Hardik Savani | February 5, 2016 | | 4055 Viewer | Category : Javascript HTML jQuery

PHP: How to count files in folder?

In PHP, you are work on php and you want to need display count number of files in specific folder then you do, glob() through you count number of file are there in specified folder. now in following example you can see "/var/www/test" in this folder, count how many files are there in that folder. glob function take a two argument first one for directory or folder path and second argument for filter. Filter means if you pass '*' then it will count all type of file, i mean all extension, but if you need to count just text file then you can put like '*.txt'. That't it, if in your directory, func.....

By Hardik Savani | February 4, 2016 | | 1281 Viewer | Category : PHP

How to find day from specific date in PHP?

Whenever you need to det day like Monday, Tuesday etc from full date. i mean you have any specific date like "2015-10-10" and you want to get day then you can do in both way first using strtotime() and second using DateTime object. In Following example you can see i give you both way to get day from your date. now i added format 'l' so it will return full name of day like "Tuesday", but if you want to get short name of day then you can change format like "D". <pre class="language-php"> // Using strtotime() $specificDate = strtotime('2016-2-3'); $specificDate = date('l', $specificDate); var_d.....

By Hardik Savani | February 3, 2016 | | 602 Viewer | Category : PHP

virtual host Login With FB Ajax Request croppie.js apache2 Google Map User Agent Numeric QR Code PostgreSQL SMTP Command tree view Zoho mail Scroll Top CORS Join Cross xoxco tags input CURL Base URL Listener encrypter stevebauman/location composer package Module Jquery Plugin Trans Helper Particular 500 error page Laravel 5.3 Tooltip filesize() Origin google recaptcha code Strip Tags select2.js Animate Subscription Draggable Image Upload Google Chart Dialog box Form JS Plugin FIND_IN_SET() Month Gmail Tracking Site clockface plugin Javascript toastr js SUBSTRING_INDEX() Bootstrap show password Plugin php_ini_loaded_file Force Chart Send Script Determine Page Letter Number Laravel 4 KCFinder Form Jquery Lavacharts Multiple File Clear File Upload Payment Gateway throttle Scratch Element Remote MySQL Subquery slice() HTML to PDF oauth hasTable voyager package Lightbox Object to Array ajaxComplete refs Tutorial thomaswelton/laravel-gravatar Message Location Manual chmod Demo Sendgrid API Ionic Mailchimp API Calculate User Laravel 5.4 ajaxStart glob Components & Slots league/flysystem-dropbox gmaps.js Allow is_null Thumbnails Twitter Bootstrap Twitter API date_format() Image Installation csv Facade Last Parsleyjs Git Bootstrap-lightbox Plugin CASE_LOWER socket Library ID Paging Confirm Box daterangepicker str_replace PingPong Custom Jquery UI Upgrade Resize Image validator.js mac Trigger Switchery JS Remember me Class Repo Query Null XSS Eloquent-Sluggable Package Import Search Column Check Blocked word-wrap node.js