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: '', 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 | | 2143 Viewer | Category : PHP Javascript jQuery Ajax

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 | | 7528 Viewer | Category : Laravel

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 | | 4548 Viewer | Category : PHP Laravel Node JS

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 | | 148947 Viewer | Category : Laravel jQuery AngularJS Ajax JWT

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 | | 19247 Viewer | Category : Laravel jQuery AngularJS Ajax

Script mysqld.sock Notification auth() Select Query View AngularJS Directive Ip Address Convert marker Language stevebauman/location composer package max_file_uploads Ubuntu Cache Index Codeigniter 3 Bootstrap Tokenfield Plugin Laravel 5.5 Old Phonegap Example Ubuntu 14.04 RSS Feed datatables Number Undefined Eloquent-Sluggable Package Protection characters slice() bootstrap-growl socket Where Not In Query Admin Panel Trigger ppa Bootstrap maxlength plugin 500 error page Scratch Toggle response() unicodeveloper/laravel-password Key Custom Command gmaps.js Barcode jQuery AngularJS Zoho mail Variable Location Image Payment Gateway Algolia Package Character Exists Dropzone.js Gmail Twitter OAuth apache2 JWT Effect Javascript SEO Datetimepicker Zip MSSQL str_random() Xampp Command DATEDIFF() Validation Linux Link php.ini filter_var Paypal Payment Gateway Setup Highlight JS Dynamic Dependant Dropdown Datepicker ajaxStart is_null public_path Facebook API bplist-parser select box search Attribute COUNT() Input Scout Package hasColumn clearbit API Email Origin basename() Allow toastr js Module Stripe Log npm Current Page voyager package Element intervention/image meta http-equiv tag MassAssignmentException ACL Field Count clockface plugin Localization FIND_IN_SET() Image Gallery ajaxComplete node.js Laravel clipboard.js Function Parsley Laravel 4 Jquery Plugin Gravatar Image Laravel Cashier Issue execute query Download Migration Library Send toArray() Commit oauth Remember me Route X-editable Plugin Controluser MySQL Subquery FILTER_VALIDATE_URL Query Builder Artisan DB Homepage Solve word-wrap Interfaces DB::raw() Limit