PHP code example of raoul2000 / yii2-bgswitcher-widget

1. Go to this page and download the library: Download raoul2000/yii2-bgswitcher-widget 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/ */

    

raoul2000 / yii2-bgswitcher-widget example snippets



	use raoul2000\widget\bgswitcher\BgSwitcher;
	
	BgSwitcher::widget([
		'selector' => '#targetId',
		'pluginOptions' => [
			'images' => [
				'images/background/image1.jpg',
				'images/background/image2.jpg',
				'images/background/image3.jpg',
				'http://placehold.it/350x150'   // this image is remote
			]
		]
	]);

php composer.phar