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 | |
/** | |
* @property-read int $someProp | |
* @property int $otherProp | |
*/ | |
class User {} |
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 User extends Authenticatable implements JWTSubject | |
{ | |
protected function customFields(): Attribute | |
{ | |
return Attribute::make( | |
get: fn (?string $value) => (object)json_decode($value), | |
set: fn (array|object $value) => json_encode($value, JSON_FORCE_OBJECT), | |
); |
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 | |
declare(strict_types=1); | |
namespace App\Models; | |
use App\Models\Passport\Client; | |
use Database\Factories\UserFactory; | |
use Illuminate\Database\Eloquent\Builder; | |
use Illuminate\Database\Eloquent\Factories\HasFactory; |
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 | |
RESPONSE=$(curl --location --insecure --request POST 'http://server.local/oauth/token' \ | |
--header 'Content-Type: application/x-www-form-urlencoded' \ | |
--data-urlencode 'grant_type=password' \ | |
--data-urlencode 'client_id=123' \ | |
--data-urlencode 'client_secret=456' \ | |
--data-urlencode 'username=admin' \ | |
--data-urlencode 'password=123' \ | |
--data-urlencode 'scopes=full_access email openid') |
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\Feature; | |
use Symfony\Component\HttpFoundation\Request; | |
use Tests\TestCase; | |
class BrandResolveByMultipleDomainsTest extends TestCase | |
{ |
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 | |
# first ensure the system is full updated | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get dist-upgrade | |
# first search the proper kernel | |
apt-cache search linux-image |
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 | |
CONTAINER_NAME="web" | |
echo "Stopping the web container..." | |
./vendor/bin/sail stop $CONTAINER_NAME | |
echo "Disabling Xdebug and setting mode to debug,develop..." | |
./vendor/bin/sail exec $CONTAINER_NAME bash -c "echo 'xdebug.mode=off' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini" |
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
# install xdebug | |
# xdebug and PHP config in php.ini | |
RUN pecl install xdebug-3.1.3 | |
RUN docker-php-ext-enable xdebug |
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
class Maybe { | |
constructor(v){ | |
this.value = v; | |
}; | |
bind(func) { | |
return new Maybe(func(this.value)); | |
} | |
getValue() { |
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 App\Contracts\BrandNameResolverInterface as BrandNameResolverServiceContract; | |
use App\Http\Controllers\Auth\PasswordBrokerManager; | |
use App\Repositories\Interfaces\AccountInterface; | |
use App\Services\Filesystem\FtpAdapter; | |
use App\Services\User\AccountSessionService; | |
use App\View\Components\Modal; |
NewerOlder