PHP code example of cornernote / yii2-returnurl

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

    

cornernote / yii2-returnurl example snippets


// generate a returnUrl link value
Html::a('edit post', ['post/update', 'id' => $post->id, 'ru' => ReturnUrl::getToken()]);

// generate a returnUrl form value
Html::hiddenInput('ru', ReturnUrl::getRequestToken());

// this is where we used to redirect to, we use it as a fail-back
// (if not provided then we redirect to the home page)
$altUrl = ['post/index'];
return $this->redirect(ReturnUrl::getUrl($altUrl));