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 | |
if (!function_exists('get_path')) { | |
function get_path(array $data, $path) | |
{ | |
$nodes = is_string($path) ? explode('.', $path) : $path; | |
$node = array_shift($nodes); | |
$getNext = function ($item) use ($nodes) { | |
return $nodes ? (is_array($item) ? get_path($item, $nodes) : null) : $item; |
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 | |
if (!function_exists('array_is_assoc')) { | |
/** | |
* Determine if the given array is associative or numerically indexed | |
* | |
* @param array $array | |
* @return bool | |
*/ | |
function array_is_assoc(array $array) |
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 Tests; | |
use InvalidArgumentException; | |
use Illuminate\Support\Collection; | |
use Laravel\Dusk\TestCase as BaseTestCase; | |
use Facebook\WebDriver\Chrome\ChromeOptions; | |
use Facebook\WebDriver\Firefox\FirefoxOptions; | |
use Facebook\WebDriver\Remote\RemoteWebDriver; |
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 Carbon\Carbon; | |
use Illuminate\Support\Str; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Database\QueryException; | |
use Illuminate\Database\Query\JoinClause; | |
use Illuminate\Database\Query\Expression; | |
use Illuminate\Contracts\Support\Jsonable; | |
use Illuminate\Contracts\Support\Arrayable; |
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
;zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so | |
;Version 2 | |
xdebug.remote_autostart=0 | |
xdebug.remote_connect_back=0 | |
xdebug.remote_enable=On | |
xdebug.remote_handler=dbgp | |
xdebug.remote_host=host.docker.internal | |
xdebug.remote_mode=req | |
xdebug.remote_port=9003 |
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 | |
class TestCase | |
{ | |
/** | |
* @inheritDoc | |
*/ | |
protected function setUpTraits() | |
{ | |
$this->artisan('optimize:clear'); |
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\Providers; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\{Collection, ServiceProvider}; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
/** |
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 string $name | |
* @param array $params | |
* @return string | |
*/ | |
function routeByName(string $name, array $params = []): string | |
{ | |
if (!static::$routesByName) { |
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 | |
$this->client = app(ClientRepository::class)->create(null, $clientName, ''); | |
$response = $this->post(route('passport.token'), [ | |
'grant_type' => 'client_credentials', | |
'client_id' => $this->client->getKey(), | |
'client_secret' => $this->client->plainSecret, | |
'scope' => implode(' ', $scopes) | |
]); | |
$this->token = $response->json('token_type').' '.$response->json('access_token'); |
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 | |
if (!function_exists('conf')) { | |
/** | |
* Look for a dot-delimited name/key reference | |
* @param string $name | |
* @return mixed|null | |
*/ | |
function conf(string $name) | |
{ |