-
-
Save findli/daec0d3170453899909d2f7f3ca4a0c1 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