Created
September 1, 2017 15:12
-
-
Save carcinocron/4d401d0c431eeb3e098b259e37f30046 to your computer and use it in GitHub Desktop.
CORS usable dd (laravel)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Methods: *'); | |
header('Access-Control-Allow-Headers: *'); | |
dd(__FILE__); | |
// or use a function | |
function ddcors(...$args) { | |
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Methods: *'); | |
header('Access-Control-Allow-Headers: *'); | |
dd(...$args); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment