PHP code example of mg-code / yii2-filters
1. Go to this page and download the library: Download mg-code/yii2-filters 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/ */
mg-code / yii2-filters example snippets
public function behaviors()
{
return [
'onlyAjax' => [
'class' => \mgcode\filters\AjaxFilter::className(),
'only' => ['ajaxValidate'],
],
];
}
public function behaviors()
{
return [
'disableCsrf' => [
'class' => \mgcode\filters\DisableCsrfValidationFilter::className(),
'only' => ['feedback'],
],
];
}