PHP code example of georgebuilds / livewire-molecule

1. Go to this page and download the library: Download georgebuilds/livewire-molecule 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/ */

    

georgebuilds / livewire-molecule example snippets


// config/livewire-molecule.php

return [
    // Default background color
    'default_background' => '#ffffff',

    // HTTP timeout for external APIs (seconds)
    'timeout' => 10,

    // Default 3Dmol.js options
    'viewer_options' => [],
    'model_options' => [],
    'style_options' => [],

    // Cache settings for resolved molecules
    'cache' => [
        'enabled' => true,
        'ttl' => 60 * 60 * 24, // 24 hours
        'prefix' => 'molecule_',
    ],
];

// v1
config('molecule.default_background');

// v2
config('livewire-molecule.default_background');
bash
php artisan vendor:publish --tag=molecule-config
bash
php artisan vendor:publish --tag=molecule-config