PHP code example of coreplex / bridge

1. Go to this page and download the library: Download coreplex/bridge library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

coreplex / bridge example snippets


"coreplex/bridge": "~0.1"

'providers' => array(

  Coreplex\Bridge\JavascriptServiceProvider::class,

);

'aliases' => array(

  'Javascript'  => Coreplex\Bridge\Facades\Javascript::class,

);

$bridge = new Javascript();

Javascript::share('foo, 'bar');

public function __construct(Coreplex\Bridge\Contracts\Javascript $bridge)
{
    $this->bridge = $bridge;
}

$bridge->share('foo', 'bar')->share('baz', 'qux');
// OR
$bridge->share(['foo' => 'bar', 'baz' => 'qux']);

echo $bridge->renderSharedData();