Skip to content

Instantly share code, notes, and snippets.

@carcinocron
Created September 1, 2017 15:12
Show Gist options
  • Save carcinocron/4d401d0c431eeb3e098b259e37f30046 to your computer and use it in GitHub Desktop.
Save carcinocron/4d401d0c431eeb3e098b259e37f30046 to your computer and use it in GitHub Desktop.
CORS usable dd (laravel)
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