Showing posts with label Laravel. Show all posts
Showing posts with label Laravel. Show all posts

Thursday, April 20, 2017

How to enable CORS in Laravel 5

https://www.youtube.com/watch?v=PozYTvmgcVE

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

Monday, September 12, 2016

Laravel 5.1 Useful Resources


 

Hosting



  • Host in a shared server - http://laraveldaily.com/laravel-and-shared-hosting-working-with-ftp-and-phpmyadmin/


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/

 

How to enable CORS in Laravel 5

https://www.youtube.com/watch?v=PozYTvmgcVE 1. Add middleware php artisan make:middleware Cors return $next($request) ->header('Acces...