PHP code example of felixl7 / laravel-ivw

1. Go to this page and download the library: Download felixl7/laravel-ivw 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/ */

    

felixl7 / laravel-ivw example snippets


// config/app.php

'providers' => [
    ...
    FelixL7\LaravelIvw\IvwServiceProvider::class,
],

'aliases' => [
    ...
    'Ivw' => FelixL7\LaravelIvw\IvwFacade::class,
],

return [
    /**
     * By default, these keys values are empty strings.
     */
    //Angebotskennung; site/domain
    'st' => env('IVW_DEFAULT_ST', ''),

    //Seitencode
    'cp' => env('IVW_DEFAULT_CP', ''),

    //Frabo Steuerung
    'sv' => env('IVW_DEFAULT_SV', ''),

    //Kommentar
    'co' => env('IVW_DEFAULT_CO', ''),

    //Privacy Settings
    'ps' => env('IVW_DEFAULT_PS', ''),
    'use_ps' => env('IVW_USE_PS', false),

    //MCVD Aktivierung
    'sc' => env('IVW_DEFAULT_SC', ''),
    'use_sc' => env('IVW_USE_SC', false),

    //Übertragungsmethode
    'method' => env('IVW_METHOD', 0),

    /*
     * Enable or disable script rendering. Useful for local development. By default, it is disabled.
     */
    'enabled' => env('IVW_ENABLED', false),

    //Testmodus
    'test_mode' => env('IVW_TEST_MODE', false),

];


// Check whether script rendering is enabled
$enabled = Ivw::isEnabled(); // true|false

// Enable and disable script rendering
Ivw::enable();
Ivw::disable();

//get the DataLayer
//returns IvwIamData, this has basic getter & setter
$iam_data = Ivw::getIamData();

//returns the iam_data
$json = $iam_data->getIamDataJson();
bash
php artisan vendor:publish --provider="FelixL7\LaravelIvw\IvwServiceProvider" --tag="config"
bash
php artisan vendor:publish --provider="FelixL7\LaravelIvw\IvwServiceProvider" --tag="views"

{{-- layout.blade.php --}}
<html>
  <head>
    @.. --}}
    @