- Свойства сущностей с точки зрения нейминга и типов данных должны быть идентичны по всему проекту.
- В dev контуре проверка CORS должна быть отключена.
- Коды ответа регламентированы списком кодов состояния http и должны логически соответствовать состоянию приложения
- Коды ответа возвращаются и на уровне http, и на уровне response body.
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
/** | |
* Deep diff between two object, using lodash | |
* @param {Object} object Object compared | |
* @param {Object} base Object to compare with | |
* @return {Object} Return a new object who represent the diff | |
*/ | |
function difference(object, base) { | |
function changes(object, base) { | |
return _.transform(object, function(result, value, key) { | |
if (!_.isEqual(value, base[key])) { |
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
function num2word($num) | |
{ | |
// $num - цело число | |
# Все варианты написания чисел прописью от 0 до 999 скомпануем в один небольшой массив | |
$m=array( | |
array('ноль'), | |
array('-','один','два','три','четыре','пять','шесть','семь','восемь','девять'), | |
array('десять','одиннадцать','двенадцать','тринадцать','четырнадцать','пятнадцать','шестнадцать','семнадцать','восемнадцать','девятнадцать'), | |
array('-','-','двадцать','тридцать','сорок','пятьдесят','шестьдесят','семьдесят','восемьдесят','девяносто'), |
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; | |
listen [::]:80 ipv6only=on; | |
# Log files for Debugging | |
access_log /var/log/nginx/laravel-access.log; | |
error_log /var/log/nginx/laravel-error.log; | |
# Webroot Directory for Laravel project | |
root /var/www/laravel/public; |
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
vi /etc/environment | |
add these lines... | |
LANG=en_US.utf-8 | |
LC_ALL=en_US.utf-8 |