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; | |
trait EntityIsRemoved | |
{ | |
private $isRemoved; | |
public function getIsRemoved(): ?bool |
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
# config/services.yaml | |
parameters: | |
parameter_name: '%env(envVar:ENV_PARAMETER_NAME)%' | |
services: | |
App\Service\Env\EnvVar: | |
class: App\Service\Env\EnvVar | |
public: true |
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 bash | |
phpVersion=7.3 | |
if [[ "$1" == "status" ]]; then | |
if [[ -e /etc/php/${phpVersion}/fpm/conf.d/20-xdebug.ini ]]; then | |
echo "Xdebug is Enabled"; | |
else | |
echo "Xdebug is Disabled"; | |
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
{ | |
"_readme": [ | |
"This file locks the dependencies of your project to a known state", | |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", | |
"This file is @generated automatically" | |
], | |
"content-hash": "d70bf592518f042992850c6f6dffdcfb", | |
"packages": [ | |
{ | |
"name": "api-platform/api-pack", |
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\Serializer\Normalizer; | |
use App\Entity\User; | |
use Symfony\Component\Serializer\Normalizer\CacheableSupportsMethodInterface; | |
use Symfony\Component\Serializer\Normalizer\NormalizerInterface; | |
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; | |
class UserNormalizer implements NormalizerInterface, CacheableSupportsMethodInterface |
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\Entity; | |
use ApiPlatform\Core\Annotation\ApiFilter; | |
use ApiPlatform\Core\Annotation\ApiResource; | |
use ApiPlatform\Core\Annotation\ApiSubresource; | |
use ApiPlatform\Core\Serializer\Filter\PropertyFilter; | |
use Carbon\Carbon; | |
use Doctrine\Common\Collections\ArrayCollection; |
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\ApiPlatform; | |
use ApiPlatform\Core\Exception\ResourceClassNotFoundException; | |
use ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface; | |
use ApiPlatform\Core\Metadata\Resource\ResourceMetadata; | |
class AutoGroupResourceMetadataFactory implements ResourceMetadataFactoryInterface |
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
import React from 'react'; | |
import { View, Text, StyleSheet } from 'react-native'; | |
const ComponentName = props => { | |
return ( | |
<View> | |
</View> | |
); | |
}; |
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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
resource "aws_iam_role" "aws_sam_api_deployment_role" { | |
name = "aws-sam-api-deployment-role" | |
assume_role_policy = data.aws_iam_policy_document.deployment_role.json | |
tags = local.tags | |
} | |
data "aws_iam_policy_document" "deployment_role" { | |
statement { | |
effect = "Allow" | |
actions = ["sts:AssumeRole"] |
OlderNewer