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
#!/usr/bin/env sh | |
set -e | |
if [ "$#" -gt 0 ]; then | |
exec php artisan "$@" | |
else | |
if [ ! -f .env.$APP_ENV.encrypted ]; then | |
echo "Encrypted .env file for \"$APP_ENV\" not found, skipping..." | |
else |
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
#!/bin/bash | |
# Initialize the wiki | |
if [ ! -d .git ] && [ "$(git rev-parse --is-bare-repository 2> /dev/null)" != "true" ]; then | |
# Check if the parent repository has a wiki | |
REPO=$(git --git-dir=/.git config --get remote.origin.url | sed -e 's/.git$/.wiki.git/g' -e 's/:/\//g' -e "s/git@/https:\/\/$GIT_AUTH@/g" -e "s/:\/\/@/:\/\//g") | |
[ ! -z $REPO ] \ | |
&& git clone --no-tags --single-branch --depth 1 $REPO . 2> /dev/null \ | |
|| git init 2> /dev/null | |
fi |
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
<?php | |
namespace Finagin\Support; | |
use Illuminate\Console\ConfirmableTrait; | |
use Illuminate\Database\ConnectionInterface; | |
use LogicException; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; |
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
<?php | |
use Illuminate\Contracts\Auth\Authenticatable; | |
use Illuminate\Support\Facades\Auth; | |
use Illuminate\Support\Facades\Gate; | |
Auth::macro('shadow', function ($user = null) { | |
$ability = 'shadowLogin'; | |
$key = 'shadow.user.id'; | |
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
<?php | |
namespace Finagin\Support\Logging\Handlers; | |
use Monolog\Handler\StreamHandler; | |
use Monolog\Logger; | |
use Monolog\Processor\IntrospectionProcessor; | |
use Monolog\Utils; | |
class ClassFile extends StreamHandler |
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
#!/usr/bin/env php | |
<?php | |
namespace { | |
use Finagin\Phar\Builder; | |
Builder::make() | |
->setCliEntryPoint('cli.php') | |
->setWebEntryPoint('web.php') |
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
<?php | |
namespace App\Services; | |
use App\Attributes\Route as RouteAttribute; | |
use Illuminate\Routing\Router; | |
use Illuminate\Support\Facades\Route as RouteFacade; | |
use Illuminate\Support\Str; | |
use ReflectionClass; | |
use ReflectionMethod; |
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
<?php | |
/** | |
* @param \DateTime|null $date Дата для которой рассчитать начало и конец месяца. | |
* Если не передать считает от текущего момента. | |
* | |
* @return array<string, int> Массив из трёх timestamp: начало месяца, конец месяца, дата от которой производился расчёт | |
* @throws \Exception | |
*/ | |
function boundaries(\DateTime $date = null) |
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
<?php | |
namespace App\Services; | |
use App\Contracts\Helper; | |
use Illuminate\Contracts\Container\BindingResolutionException; | |
use Laravel\Nova\Nova; | |
class HelperService implements Helper | |
{ |
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
<?php | |
namespace App\Traits; | |
use Illuminate\Support\Str; | |
trait UsesUuid | |
{ | |
/** | |
* Boot the UUID trait for a model. |
NewerOlder