PHP code example of aki / yii2-make-button

1. Go to this page and download the library: Download aki/yii2-make-button 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/ */

    

aki / yii2-make-button example snippets


<?= \aki\button\MakeButton::widget([
	'text' => '<i class="fa fa-edit"></i> hello',
]); 

<?= aki\button\MakeButton::widget([
        'text' => '<i class="fa fa-edit"></i> hello',
        'ajax' => [
            'onSendRequest' => 'click',
            'url' => Url::toRoute(['post/index']),
            'type' => 'POST',
            'success' => new yii\web\JsExpression('
                function(data){
                    alert(data);
                }
            '),
            'data' => new yii\web\JsExpression("datafrom('#form')"),
        ]
]);

<?= aki\button\MakeButton::widget([
        'text' => '<span>Add to cart</span>',
        'skin' => 'creative',
        'options' => [
            'class' => aki\button\MakeButton::style()->creative->btn3e_send
        ],
]);

php composer.phar