Latest Post

How to use DB transactions in laravel 5?

First, Let's undestand why we are use transactions in laravel project. But db transactions is very important concept and very usefull because it securely manage. laravel 5 also provide to transactions commit, rollback etc functions. How to use transactions in my project, so I an going to give you one example, I have a three table "items", "items_city" and "items_count" and i need to add new row same time and "items" table is a main table then "items_city" and "items_count" is a child table of "items" table. so bassically why we nee to use transactions because if when i was add new records in d.....

By Hardik Savani | March 6, 2016 | | 3534 Viewer | Category : PHP Laravel

Angular $scope.form value undefined on submit in ionic framework.

When i was working first time in ionic framework with search module. i fetch one issue i can't get ng-model value in angular js controller on submit form. i was try like $scope.form because if you work on angular JS before then you can get all post data using $scope.form directly, But i try with bellow form and try to get that way but i always find undefined value on form, But at last i found how to solve this issue. you can see bellow example and find your solution. <strong>Form</strong> <pre class="prettyprint lang-html"> <form method="POST" name="searchForm" ng-submit="search()"> &l.....

By Hardik Savani | March 5, 2016 | | 4564 Viewer | Category : jQuery AngularJS Ionic Framework

PHP Image upload without refreshing page using jquery example

In this post i show you how to image upload without page reload using jquery ajax. jquery ajax through you can upload image and store record into database in php. i use jquery.form plugin for image uploading. So you can do by following few step of file uploading ajax jquery. <strong>Preivew</strong> <img width="100%" style="border:2px solid red" src="/upload/imageupload.png"> <br/> First you have to create index.php file as i do in following file, so create index.php file and put bellow code. <strong>index.php</strong> <pre class="code language-html"> <html lang="en"> <head> <ti.....

By Hardik Savani | March 4, 2016 | | 13993 Viewer | Category : PHP Javascript jQuery

How to create middleware for XSS protection in laravel 5?

XSS(Cross Site Scripting) protection must need in your site because if you do not XSS protection then your site is not secure. XSS filter through you can remove html tag from your input value and it is very important to remove html tag for security. in your laravel 5.2 application you can implement by using middleware concept in your project. so how to create XSS filter middleware in your laravel application by using following step. First fire following command and create middleware: <strong class="step">Create Middleware</strong> <pre>php artisan make:middleware XSS</pre> Now, you can see new.....

By Hardik Savani | March 4, 2016 | | 6227 Viewer | Category : PHP Laravel

How to generate random alphanumeric string in PHP?

In this example i am going to show you how to generate randomly alphanumeric string OR number in PHP. when you need you generate random alphanumeric string for your unique field then you can easily create using substr(), md5(), rand(), uniqid(), mt_rand(), time() and str_shuffle() php function you can create several way unique code using following example: <strong>Example</strong> <pre class="language-php"> Example 1 $generated = substr(md5(rand()),0,5); print_r($generated);<br/> Example 2 $generated = rand(10000,99999); print_r($generated);<br/> Example 3 $generated = substr(md5(uniqid(rand(.....

By Hardik Savani | March 4, 2016 | | 1864 Viewer | Category : PHP

Prompt modal toArray() Barcode LIKE Query Middleware jQuery Form Jquery Form JS Plugin Add roumen/sitemap Facebook API Windows Hard Animate auth() Config Google API Count croppie.js Sendgrid FadeIn Export clearbit API php_ini_loaded_file Laravel 5.4 node.js timestamps Function array_combine Trans Helper Toggle Captcha code Billing Strip Tags Import Artisan Command Language max_file_uploads laravel-elixir Snippet Connection meta http-equiv tag mod_rewrite Inserted Id AngularJS Filter helper dompdf oauth PostgreSQL Collapse Client side validation Recursive unicodeveloper/laravel-password Auth DB Link Object to Array Site Month CURL Ionic stevebauman/location composer package select2.js Image Gallery glob Twitter Bootstrap Parsley ixudra/curl composer package Elasticsearch RAND() AngularJS Sitemap Mysql Concat FadeOut Value Record Interfaces Opencart Character Laravel Resource Links filesize() Grayscale Image Bootstrap-lightbox Plugin Botdetect Captcha Run Project Frontside Validation hasTable Enable Bitbucket Namespace JWT Sortable Chosen JS Sql Gmail SMTP softDeletes scrollTop Remote Resize Image whitespace split bplist-parser Carbon Codeigniter Ionic framework AngularJS TrustAsHTML Filter Mail Timepicker Multi Auth Magento public_path Folder Image ServiceProvider Where Not In Query Dynamic Dependant Dropdown Draggable validator.js Limit upload_max_filesize groupBy() Current Page Fullcalendar JS Algolia Package PHP View 404 error page Remove CASE_LOWER Confirm Box maatwebsite Example Delete SweetAlert Plugin Search Admin Bootstrap Theme Datepicker str_random() Homepage Where In Query Origin Foreach Commit Select Scroll npm socket