This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your location block(s): | |
# | |
# include cors_support; | |
# | |
# A limitation to this method is that Nginx doesn't currently send headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Wide-open CORS config for nginx | |
# | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE currency; | |
-- Create table variable | |
CREATE TABLE currency ( | |
country VARCHAR(100), | |
currency VARCHAR(100), | |
code VARCHAR(100), | |
symbol VARCHAR(100) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE currency; | |
-- Create table variable | |
CREATE TABLE currency ( | |
name VARCHAR(20), | |
code VARCHAR(3), | |
symbol VARCHAR(5) | |
); | |
ALTER TABLE currency CONVERT TO CHARACTER SET utf8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name www.hostname.com; | |
rewrite ^(.+)$ http://hostname.com permanent; | |
} | |
server { | |
charset utf-8; | |
client_max_body_size 128M; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UrlManager extends \yii\web\UrlManager | |
{ | |
/** | |
* @inheritdoc | |
*/ | |
public function createUrl($params) | |
{ | |
//Получаем сформированный URL(без префикса идентификатора языка) | |
$url = parent::createUrl($params); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Layout Pjax Begin | |
--------vew begin---------- | |
# View Pjax Begin | |
# Menu | |
# View Pjax End | |
# View Pjax Begin | |
# GridView | |
# View Pjax End |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Open document | |
2. Crtl + R | |
3. Checked Regexp | |
4. Find \$(.+)(\w)_(\w) | |
5. Replace to \$$1$2\u$3 | |
6. Unchecked Regexp | |
7. Profit! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Class Controller | |
* @package backend\extensions | |
*/ | |
class Controller extends \voskobovich\crud\controllers\Controller | |
{ | |
/** | |
* @return array | |
*/ | |
public function actions() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace dashboard\controllers; | |
use dashboard\extensions\Controller; | |
use dashboard\forms\CompanyDeliveryMethodsSearchForm; | |
use dashboard\forms\CompanyOrderStatusesSearchForm; | |
use dashboard\forms\CompanyPaymentMethodsSearchForm; | |
use dashboard\forms\CompanyPhotoDeleteForm; | |
use dashboard\forms\CompanyPhotoForm; |
OlderNewer