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
Showing posts with label Laravel. Show all posts
Showing posts with label Laravel. Show all posts
Thursday, April 20, 2017
Monday, September 12, 2016
Laravel 5.1 Useful Resources
- Update account password - http://teamnik.org/how-to-update-user-password-in-laravel5/
- User ACL with Entrust - http://itsolutionstuff.com/post/laravel-52-user-acl-roles-and-permissions-with-middleware-using-entrust-from-scratch-tutorialexample.html
- Track user last login time - http://coffeecupweb.com/capture-last-login-time-in-laravel-5/
- Retain old input & object state with create edit form - https://laracasts.com/discuss/channels/code-review/clean-way-to-inject-old-input
- Load settings from database -
http://stackoverflow.com/questions/32824781/laravel-load-settings-from-database
https://laracasts.com/discuss/channels/general-discussion/l5-best-way-to-load-settings-from-database - Custom Helper -
http://laravel-recipes.com/recipes/50/creating-a-helpers-file
http://stackoverflow.com/questions/28290332/best-practices-for-custom-helpers-on-laravel-5 - Cron Jobs
https://www.sitepoint.com/managing-cronjobs-with-laravel/
http://www.easylaravelbook.com/blog/2015/01/27/introducing-the-laravel-5-command-scheduler/
http://blog.mauriziobonani.com/laravel-cron-jobs-on-shared-hosting/
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/
Subscribe to:
Posts (Atom)
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...
-
I have already written several posts regarding Android database applications. This post might be similar to those tuts. However this is more...
-
< Requirements Java Development Kit (JDK) NetBeans IDE Apache Axis 2 Apache Tomcat Server Main Topics Setup Development Environ...