Latest Post


How to parse json in jquery ajax?

When you are working php or .net etc and you return data like json_encode($data) on ajax request. but in front side you get like a string at that time you have to parse json object and get them. so, let's see example and learn how to use: <strong class="example">Example</strong> <pre class="prettyprint lang-php"> var request = $.ajax({ type: 'POST', dataType: 'json', url: 'http://www.mysite.com/getpostuser', data: {token:obj['token'],postid: obj['postid']} }); request.done(function(msg) { msg = JSON.parse(msg); msg.forEach(function(items) { var e = "notify-"+items.userid; .....

By Hardik Savani | April 5, 2016 | | 3783 Viewer | Category : PHP Javascript jQuery Ajax
READ MORE

How to get user agent value in Laravel 5?

If you are work on laravel 5 application and you require to get user agent(user agent mean user browser details like firefox, cherome etc) then you can get easy. you don't need to use $_SERVER variable like native PHP, but laravel 5 provide Request facade. you can fetch easy using following example: <strong class="example">Example</strong> <pre class="prettyprint lang-php"> public function ImpressionCount(Request $request) { $impre['useragent'] = $request->server('HTTP_USER_AGENT'); $input['ip'] = $request->ip(); print($input); } </pre>

By Hardik Savani | April 5, 2016 | | 10532 Viewer | Category : Laravel
READ MORE

How to use foreach object in Nodejs ?

Normally, we does use foreach loop in PHP, JS etc, but when i was working on socket programming at that time i require to use foreach of object in server.js. I did also search on google and try to how to use foreach in Node JS. At last i found to use forEach and solve it. so, let's see following example. <strong >Example</strong> <pre class="prettyprint lang-php"> socket.on("newmessage", function(obj) { obj = JSON.parse(obj); obj.forEach(function(items) { console.log(items.userid); var e = "notify-"+items.userid; io.sockets.emit(e, 1); }); }); </pre>

By Hardik Savani | March 31, 2016 | | 7468 Viewer | Category : PHP Laravel Node JS
READ MORE

Laravel 5.2 API using JWT authentication tutorial from scratch example

In this post i want to share you how to create API in Laravel 5.2 with using JWT, If you are beginner then It is a very simple way to create and it is pretty easy to undestand how to create API. After this you can make more secure and complex your API. you can learn JWT authentication from back-end side. we have to learn how to works API from front-end and back-end side. i give you both side fully example how it works and use. <img width="100%" src="/upload/laravel-jwt.png" style="border:2px solid cadetblue"> JWT stand for Json Web Token. JWT will helps to create authentication and connect fro.....

By Hardik Savani | March 31, 2016 | | 195268 Viewer | Category : Laravel jQuery AngularJS Ajax JWT
READ MORE

Ajax - Cross-Origin Request Blocked in Larave 5?

When i was working on my laravel 5 project and i was making backend API, i created successfully but when front-end developer call API which i made. It's return like: "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://learnl52.hd/register. (Reason: CORS header 'Access-Control-Allow-Origin' missing)." and i did try to how to solve this issue. I did also try with jquery and angularjs from backend but result nothing always. At last i did found how to solve this issue, i made one middleware that allows to Cross-Origin Request in your laravel appli.....

By Hardik Savani | March 30, 2016 | | 24884 Viewer | Category : Laravel jQuery AngularJS Ajax
READ MORE


Sublime text 2 gravatar Update Bootstrap show password Plugin 500 error page Laravel Factory Site chmod yajra/laravel-datatables-oracle nl2br Paytm jquery.email-autocomplete.min.js Jquery Modal Sql Where Not In Query bootstrap-multiselect plugin Manual file_exists() Element Bootstrap Tokenfield Plugin Tracking Solve Base URL Download XML Path laravel-elixir Remove Modal Loop Toggle XSS Origin Parameters Google Map Google OAuth webpatser/laravel-uuid Thumbnails IP Log Check basename() Multi Auth Eloquent-Sluggable Package Query Builder 404 error page FILTER_VALIDATE_URL csv Bootstrap Star Rating Plugin Ionic Commit Permission Foreach CASE_LOWER Windows str_replace Behance API PHP Laravel Eloquent Billing React JS HTML to PDF Database Seeder Twitter Bootstrap PHPUnit Last DATEDIFF() select box search Version Moment JS colorpicker slice() Upgrade max_file_uploads setInterval() Limit strtolower Mediafıre API Effect guzzle http client Cordova Node JS Mysql Concat Validation Facade Generate filter_var LIKE Query array_combine Blocked Month mac FIND_IN_SET() select2.js Technology Animate MSSQL Sitemap Language Div croppie.js Artisan Command AngularJS Filter CURL Inserted Id Key Constraint Dropbox API Variable Control Authentication Repo getQueryLog tree view gulp Recursive gmaps.js SMTP xoxco tags input Resize Image Failed Installation Package bplist-parser JS Capitalize Issue pop() Hard Laravel Cashier Sublime text 3 AngularJS TrustAsHTML Filter Ubuntu Zoho mail socket Attr Custom Command ixudra/curl composer package Accordion Instagram API Snippet Sortable Add Artisan bootstrap-progressbar.js Input dompdf REST Excel Folder Determine