Latest Post

How to count unique domains from email address field in MySQL ?

you want to count domain from your email address field in mysql. if you are working on PHP then you could do easily by using explode function and counting domains, but that way is a very bad logic and it take max time on execution when you have lot of data. But we can do easily in MySQL by using SUBSTRING_INDEX(). SUBSTRING_INDEX() take a three arguments string, delimeter and number.string is a source of string, the delimeter to search for in the string and the number parameter will search for delimeter.If pass negative in third argument then it will everything from the left of the targeted .....

By Hardik Savani | January 14, 2016 | | 1475 Viewer | Category : PHP MySql

How to count number of files in folder and remove all files in folder example in Laravel 5 ?

you are working on laravel framwork and you want to count how many image or files in folder and print of front then you can do with laravel "File" can also count in core PHP by using glob() but if you are working on laravel then you have to use 'File' class library and it is easy and more flexible to use. If you also want to remove all the files Or images in specific folder then you can delete by using "File" class function. sometimes we need to delete files in the folder. that way: <pre class="language-php"> use Input; use File; class HomeController extends AdminController { .....

By Hardik Savani | January 13, 2016 | | 3691 Viewer | Category : Laravel

How to check undefined, empty and null in JavaScript/JQuery ?

If you are working on jquery and However you want to check variable is undefined or not then you can easily check by typeof operator, which is simple, fast and cross-platform: <pre class="language-javascript"> if(typeof i == "undefined"){ alert('undefined'); } </pre> If you are working on jquery and However you want to check variable is empty or not then you can easily check by compare with empty string: <pre class="language-javascript"> if(i == ''){ alert('Empty'); } </pre> If you are working on jquery and However you want to check variable is null or not then you can easily che.....

By Hardik Savani | January 12, 2016 | | 1944 Viewer | Category : Javascript jQuery

How to get last executed mysql query in laravel ?

If you are working on laravel framwork and you use query builder of laravel 5. but you want to get last executed mysql query from laravel. If you are working on laravel 5 then you have to first enable query log that way it can be store query log. At last getQueryLog() through you can get last executed query. I give you example of how to get last executed mysql query. you can use example as following example. <pre class="language-php"> public function querylog() { DB::enableQueryLog(); $item = Item::find(2); $last_query = DB::getQueryLog(); print_r($last_query); } </pre> Try this......

By Hardik Savani | January 11, 2016 | | 1993 Viewer | Category : Laravel MySql

Mysql procedure with pagination in laravel 5?

You are working on laravel with mysql database. you had created mysql procedure for get data and you want to call procedure with pagination in laravel 5 then you can not directly make pagination as laravel document.If you are using directly MySQL stored Procedure in your controller, model or repository and you want to give pagination like this way : <pre class="language-php"> $data = DB::select(DB::raw('CALL hardik("hari")'))->paginate(5); </pre> This way you found error in your Laravel 5 website. we can't give directly this way pagination because your procedure will get all the data fr.....

By Hardik Savani | January 11, 2016 | | 6561 Viewer | Category : Laravel MySql

phpword Value hasTable File Upgrade Library csv slice() response() RAND() Kyslik/column-sortable package Repository Pattern Column Character Payment Gateway Google API Highlight JS Query PostgreSQL Cordova Paging toastr js Sortable Field Interface roumen/sitemap oauth lowercase Redirect Rewrite Folder timestamps Enable Image Gallery Localization intervention/image array_change_key_case php.ini Google OAuth scrollTop Toggle FIND_IN_SET() Components & Slots Limit Instagram API Parameters Gmail Redis Image Configuration guzzle http client Laravel 5.4 - Markdown Mailables upload_max_filesize DATE_SUB read more Recursive Select clearInterval() Thumbnails Convert Ionic framework Capitalize Laravel Factory pop() Tutorial Calculate Socialite Add More JQuery CloudConvert API View Module Packages Permission SweetAlert Plugin Current Bootstrap Tokenfield Plugin Bootstrap maxlength plugin summernote Linkedin API Namespace Strings Middleware FILTER_VALIDATE_URL encrypter Animation Database Seeder Magento 2 preg_match XSS DB::raw() Chart.js Captcha code Artisan Facebook API Check Send bootstrap tagsinput Element node.js Admin Panel Event whitespace Popup Box Datetimepicker Dropbox API Undefined Draggable strtolower Magento Top Dynamic Dependant Dropdown Ionic validator.js Validation Select Query AngularJS URL Laravel 4 RSS clockface plugin Origin Links ACL Bootstrap Notify Plugin Each Local Laravel 5 mysqld.sock Count AngularJS TrustAsHTML Filter Function Zip Download Jquery Plugin strpos Laravel Passport Laravel Listener Laravel Builder nl2br DB Statement FadeIn select2.js socket Chat Index Empty Master ZipArchive Last