for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
if (! function_exists('hashid')) {
/**
* Get a hashid connection instance.
*
* @param string|null $name
* @return mixed
*/
function hashid($name = null)
{
return app('hashid')->connection($name);
}
if (! function_exists('urlsafe_base64_encode')) {
* Encodes the given data with base64, and returns an URL-safe string.
* @param string $data
* @return string
function urlsafe_base64_encode($data)
return strtr(base64_encode($data), ['+' => '-', '/' => '_', '=' => '']);
if (! function_exists('urlsafe_base64_decode')) {
* Decodes a base64 encoded data.
* @param bool $strict
function urlsafe_base64_decode($data, $strict = false)
return base64_decode(strtr($data.str_repeat('=', (4 - strlen($data) % 4)), '-_', '+/'), $strict);
if (! function_exists('config_path')) {
* Get the configuration path.
* @param string $path
function config_path($path = '')
return app()->basePath().DIRECTORY_SEPARATOR.'config'.($path ? DIRECTORY_SEPARATOR.$path : $path);