PHP code example of amjadiqbal / laravel-driver-js

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

    

amjadiqbal / laravel-driver-js example snippets


use AmjadIqbal\DriverJS\Facades\Driver;

$tour = Driver::make()
    ->allowClose(true)
    ->overlayColor('rgba(0,0,0,0.6)')
    ->addStep('#selector', 'Title', 'Description')
    ->addStep('.cta', 'Get Started', 'Click here to begin')
    ->drive();

$json = $tour->toJson();

$steps = [
    [
        'element' => '#selector',
        'popover' => [
            'title' => 'Title',
            'description' => 'Description',
        ],
    ],
];

return [
    'cdn_js' => 'https://unpkg.com/driver.js/dist/driver.min.js',
    'cdn_css' => 'https://unpkg.com/driver.js/dist/driver.min.css',
    'allowClose' => true,
    'overlayColor' => 'rgba(0, 0, 0, 0.5)',
    'opacity' => 0.6,
];