Skip to content

Instantly share code, notes, and snippets.

View Maykonn's full-sized avatar
🎯
Focusing

Maykonn Welington Maykonn

🎯
Focusing
View GitHub Profile

SIMPLE WEBRTC VIDEO CHAT USING PEERJS

Operating System Ubuntu 14.04 via Koding.com

Install node.js

sudo apt-get update
sudo apt-get install nodejs

Check node.js version

@Maykonn
Maykonn / how-to-enable-cors-in-laravel-5.0.md
Last active August 29, 2015 14:16
How to enable CORS in Laravel 5.0?

Is common a [CORS][1] message when accessing a Laravel Application (or better, an Laravel API), resource via another client application (an Angular.js, Backbone.js, Ember.js, or a PHP, JS, Java, Mobile, app, whatever).

To enable CORS in your Laravel application, create a route group and put inside, all routes that you need to enable CORS:

<?php
Route::group(['after' => 'allowOrigin'], function() {
    // Your fantastic resources
    Route::post('/users', function () {  // ... });
    // ...
});
<?php
$currency_symbols = array(
'AED' => '&#1583;.&#1573;', // ?
'AFN' => '&#65;&#102;',
'ALL' => '&#76;&#101;&#107;',
'AMD' => '',
'ANG' => '&#402;',
'AOA' => '&#75;&#122;', // ?
'ARS' => '&#36;',
'AUD' => '&#36;',