julesgraus/cross-origin-helpers

Enables some methods like the dd method from Laravel to work cross origin. just add a c before the function call.

1.0.1 2022-02-10 19:04 UTC

This package is auto-updated.

Last update: 2024-09-11 01:02:25 UTC


README

Enables some methods like the dd method from Laravel to work cross origin. just add a c before the function call. Compatible with laravel 7.24 and up.

Installation

With Composer

$ composer require julesgraus/cross-origin-helpers
{
    "require": {
        "julesgraus/cross-origin-helpers": "^0.1"
    }
}
<?php
require 'vendor/autoload.php';

cdd('Cross origin die and dump test');
cdie('Cross origin die test');
cdump('Cross origin dump test');

Configuration

The helpers provided by this package use the same cors config file as Laravel 7, 8 and 9 provide by default. Use Laravels cors config file config/cors to setup cors and the helpers should work too. Also see The laravel manual for more info.