email: [email protected]
skype: utz0r2
github: utz0r2
Разделы: CSS, HTML, PHP, JS, Видео, Заметки
Скрипты: vvStore | vvShop | Avox
© 2008 – 2019

stefanzweifel/laravel-stats

stefanzweifel/laravel-stats

https://github.com/stefanzweifel/laravel-stats

mjaschen/phpgeo - простая гео библиотека на PHP

<?php

use Location\Coordinate;
use Location\Distance\Vincenty;

$coordinate1 = new Coordinate(19.820664, -155.468066); // Mauna Kea Summit
$coordinate2 = new Coordinate(20.709722, -156.253333); // Haleakala Summit

echo $coordinate1->getDistance($coordinate2, new Vincenty()); // returns 128130.850 (meters; ?128 kilometers)
https://github.com/mjaschen/phpgeo

symfony/dotenv - библиотека для парсинга .env файла

APP_ENV=local
APP_DEBUG=true
APP_CACHE=false
APP_KEY=KHbSbTboS8WBT10MfSVTrE1GDkGnWgJJ

DB_HOST=localhost
DB_DATABASE=dbtest
DB_USERNAME=dbtest
DB_PASSWORD=dbpass

CACHE_DRIVER=array
SESSION_DRIVER=file

https://github.com/symfony/dotenv

glhd/aire - билдер форм для Laravel

Пример создания формы
{{ Aire::open()
  ->route('users.update')
  ->bind($user) }}

<div class="flex flex-col md:flex-row">

  {{ Aire::input('given_name', 'First/Given Name')
    ->id('given_name')
    ->autoComplete('off')
    ->groupClass('flex-1 mr-2') }}
    
  {{ Aire::input('family_name', 'Last/Family Name')
    ->id('family_name')
    ->autoComplete('off')
    ->groupClass('flex-1') }}
  
</div>
  
{{ Aire::email('email', 'Email Address') }}
  
{{ Aire::submit('Update User') }}
  
{{ Aire::close() }}

https://github.com/glhd/aire

brick/varexporter - расширенная версия var_export()

brick/varexporter - расширенная версия var_export()

https://github.com/brick/varexporter

jasny/switch-route - php скрипт генерации быстрых роутов

function getRoutes(): array
{
    return [
        'GET      /'                  => ['controller' => 'info'],

        'GET      /users'             => ['controller' => 'user', 'action' => 'list'],
        'POST     /users'             => ['controller' => 'user', 'action' => 'add'],
        'GET      /users/{id}'        => ['controller' => 'user', 'action' => 'get'],
        'POST|PUT /users/{id}'        => ['controller' => 'user', 'action' => 'update'],
        'DELETE   /users/{id}'        => ['controller' => 'user', 'action' => 'delete'],

        'GET      /users/{id}/photos' => ['action' => 'list-photos'],
        'POST     /users/{id}/photos' => ['action' => 'add-photos'],

        'POST     /export'            => ['include' => 'scripts/export.php'],
    ];
}
use Jasny\SwitchRoute\Generator;

// Always generate in development env, but not in production.
$overwrite = (getenv('APPLICATION_ENV') ?: 'dev') === 'dev';

$generator = new Generator();
$generator->generate('route', 'generated/route.php', 'getRoutes', $overwrite);

https://github.com/jasny/switch-route
«»
Вверх