RSS

How to enable CORS in Laravel 5

How to enable CORS in Laravel 5

1. Add middleware
php artisan make:middleware Cors

return $next($request)
->header(‘Access-Control-Allow-Origin’, ‘*’)
->header(‘Access-Control-Allow-Methods’, ‘GET, POST, PUT, DELETE, OPTIONS’);

2. Register middleware as a route middleware

3. Use middleware in routes which support CORS

 
Leave a comment

Posted by on April 20, 2017 in Laravel

 

Tags: ,

Video

Up and Running MapServer in Windows

 
Leave a comment

Posted by on April 5, 2017 in Geo Programming

 

Tags: ,

Video

How to Convert Shape file into geojson

 
Leave a comment

Posted by on April 3, 2017 in Geo Programming

 

Tags: ,

Social Networks Token Playground

Facebook

Generate Token:
https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&path=me%3Ffields%3Did%2Cfirst_name%2Clast_name%2Cemail&version=v2.8

Get user by access token:

https://graph.facebook.com/me?fields=id,first_name,last_name,email,picture&access_token={ACCESS_TOKEN}

 

Google

Generate Token:
https://developers.google.com/oauthplayground/

Get user by access token:
https://www.googleapis.com/oauth2/v1/userinfo?access_token={ACCESS_TOKEN}

 
Leave a comment

Posted by on February 6, 2017 in Uncategorized

 

Tags:

Laravel 5.1 Useful Resources

 

Hosting

Lumen

https://github.com/lucadegasperi/oauth2-server-laravel

http://esbenp.github.io/2015/05/26/lumen-web-api-oauth-2-authentication/

http://mrgott.com/joomla/24-integrate-oauth2-server-into-lumen-to-secure-your-restful-api-with-access-tokens

http://loige.co/developing-a-web-application-with-lumen-and-mysql/

 

 
Leave a comment

Posted by on September 12, 2016 in Laravel, PHP

 

Tags:

Link

http://www.apphp.com/tutorials/index.php?page=multilanguage-database-design-in-mysql

 
Leave a comment

Posted by on January 8, 2016 in PHP

 

Handle Cloning with jQuery Uniform

If you try to apply uniform styles for cloned elements, you may come across some weird situations where you don’t get the expected output. Just try this if it applies to you also.

The bold text is the most important and it should be applied in the same order.

$.uniform.restore(‘.is_variant_enabled’);
$(‘.is_variant_enabled’).uniform();

 

$.uniform.restore('.is_variant_enabled');
var row = $("#tbl_variants").find('tr:eq(1)').clone();
$("#tbl_variants tbody").prepend(row);
$('.is_variant_enabled').uniform();
 
Leave a comment

Posted by on November 25, 2015 in jQuery

 

Tags: