This file contains hidden or 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 App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Arr; | |
use Illuminate\Support\Str; | |
use SoapClient; | |
use SoapFault; | |
use Throwable; |
This file contains hidden or 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 | |
function prettify($str) | |
{ | |
$length = strlen($str) - 2; | |
if ($length > 10) { | |
$str = sprintf('%s%s[%sx 0]%s%s', substr($str, 0, 3), '...', $length - 3, '...', substr($str, $length)); | |
} | |
return $str; |
This file contains hidden or 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 App\Http\Requests\Files; | |
use App\Helpers\File\FileHelper; | |
use App\Overrides\FormRequest\FormRequest; | |
class UploadFileRequest extends FormRequest | |
{ | |
public function rules(): array |
This file contains hidden or 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 App\Helpers\File; | |
use Illuminate\Http\File; | |
use Illuminate\Http\UploadedFile; | |
use Illuminate\Support\Arr; | |
class FileHelper | |
{ |
This file contains hidden or 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 App\Traits; | |
use Closure; | |
use Illuminate\Database\Eloquent\Builder; | |
trait HasWhereNotTrait | |
{ | |
/** |
This file contains hidden or 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 App\Http\Middleware; | |
use Closure; | |
class Language | |
{ | |
public function handle($request, Closure $next) | |
{ |
This file contains hidden or 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 | |
function geoToLat(string $input): string | |
{ | |
static $mapper = [ | |
'ა' => 'a', | |
'ბ' => 'b', | |
'გ' => 'g', | |
'დ' => 'd', | |
'ე' => 'e', |