Разделы
Veselov CV | vvShop © 2008 – 2017
Контакты
email: igor@veselov.sumy.ua
skype: utz0r2
» » » Страница 3

beyondcode/laravel-self-diagnosis - скрипт диагностики laravel приложения


beyondcode/laravel-self-diagnosis - скрипт диагностики laravel приложения

php artisan self-diagnosis

https://github.com/beyondcode/laravel-self-diagnosis

laravel-swoole - пакет позволяет использовать laravel высокопроизоводительный сервер Swoole


Nginx with FPM
wrk -t4 -c10 http://lumen-swoole.local
Running 10s test @ http://lumen-swoole.local
4 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 6.41ms 1.56ms 19.71ms 71.32%
Req/Sec 312.99 28.71 373.00 72.00%
12469 requests in 10.01s, 3.14MB read
Requests/sec: 1245.79
Transfer/sec: 321.12KB


Swoole HTTP Server
wrk -t4 -c10 http://lumen-swoole.local:1215
Running 10s test @ http://lumen-swoole.local:1215
4 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 2.39ms 4.88ms 105.21ms 94.55%
Req/Sec 1.26k 197.13 1.85k 68.75%
50248 requests in 10.02s, 10.88MB read
Requests/sec: 5016.94
Transfer/sec: 1.09MB

https://github.com/swooletw/laravel-swoole

appzcoder/30-seconds-of-php-code - коллекция php сниппетов


Короткие функции: all, any, chunk, deepFlatten, drop, findLast, findLastIndex, flatten, groupBy, hasDuplicates, head, last, pluck, pull, reject, remove, tail, take, without, average, factorial, fibonacci, gcd, isEven, isPrime, lcm, median, endsWith, firstStringBetween, isAnagram, isLowerCase, isUpperCase, palindrome, startsWith и др.

Пример, получение последнего элемента массива:
function findLast($items, $func)
{
    $filteredItems = array_filter($items, $func);
    return array_pop($filteredItems);
}

https://github.com/appzcoder/30-seconds-of-php-code

laravolt/avatar - плагин создания аватара на основе имени для laravel


laravolt/avatar - плагин создания аватара на основе имени для laravel

//this will output data-uri (base64 image data)
//something like data:image/png;base64,iVBORw0KGg....
Avatar::create('Joko Widodo')->toBase64();

//use in view
//this will display initials JW as an image
<img src="{{ Avatar::create('Joko Widodo')->toBase64() }}" />

https://github.com/laravolt/avatar

laravel-slack - уведомления в slack из laravel


\Slack::to('#finance')->send('Hey, finance channel! A new order was created just now!');

https://github.com/gpressutto5/laravel-slack

psecio/secure_dotenv - библиотека для шифрования/дешифрования .env файла


<?php
require_once __DIR__.'/vendor/autoload.php';

$keyfile = __DIR__.'/keyfile';
$envFile = __DIR__.'/.env';

$d = new \Psecio\SecureDotenv\Parser($keyfile, $envFile);

// The contents here is the set of all decrypted values fron the .env
print_r($d->getContent());
?>

https://github.com/psecio/secure_dotenv
«»
Вверх