This file contains hidden or 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
# Stage 1: Build | |
FROM php:8.4-cli AS build | |
# Setup build root | |
WORKDIR /app | |
# Install dependencies | |
RUN apt-get update && apt-get install -y \ | |
git \ | |
unzip \ |
This file contains hidden or 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 { cn } from '@/lib/utils'; | |
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area'; | |
import * as React from 'react'; | |
import { useEffect, useRef, useState } from 'react'; | |
const ScrollArea = React.forwardRef< | |
React.ComponentRef<typeof ScrollAreaPrimitive.Root>, | |
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & { fade?: boolean } | |
>(({ className, fade, children, ...props }, ref) => { | |
const viewPortRef = useRef<HTMLDivElement | null>(null); |
This file contains hidden or 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 { FormDataKeys, FormDataType, Method } from '@inertiajs/core'; | |
// @ts-expect-error TS2307 | |
import type { Response } from '@inertiajs/core/types/response'; | |
import type { InertiaFormProps } from '@inertiajs/react'; | |
import { useForm } from '@inertiajs/react'; | |
import axios, { AxiosProgressEvent, AxiosRequestConfig, AxiosResponse } from 'axios'; | |
import { cloneDeep } from 'lodash-es'; | |
import { useCallback, useMemo, useRef, useState } from 'react'; | |
type HttpMethod = 'get' | 'post' | 'put' | 'patch' | 'delete'; |
This file contains hidden or 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\Casts; | |
use Brick\Money\Money; | |
use UnexpectedValueException; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Contracts\Database\Eloquent\CastsAttributes; | |
use Illuminate\Contracts\Database\Eloquent\SerializesCastableAttributes; |
This file contains hidden or 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 { | |
forwardRef, | |
MiddlewareConsumer, | |
Module, | |
NestModule, | |
} from '@nestjs/common'; | |
import { TypeOrmModule } from '@nestjs/typeorm'; | |
import { Audit } from '@/audit/entities/audit.entity'; | |
import { AuditMiddleware } from '@/audit/middlewares/audit.middleware'; | |
import { APP_GUARD } from '@nestjs/core'; |
This file contains hidden or 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\Support\Routing; | |
use Illuminate\Routing\UrlGenerator as BaseUrlGenerator; | |
use Mcamara\LaravelLocalization\Facades\LaravelLocalization; | |
class UrlGenerator extends BaseUrlGenerator | |
{ | |
public function to($path, $extra = [], $secure = null): string |
This file contains hidden or 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 { Injectable } from '@nestjs/common'; | |
import { | |
ValidationArguments, | |
ValidatorConstraint, | |
ValidatorConstraintInterface, | |
} from 'class-validator'; | |
import { ComparisonValidatorType } from '@/app/enums/comparison-validator-type.enum'; | |
export type ComparisonValidatorConstraint<T extends object> = [ | |
keyof T, |
This file contains hidden or 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 { | |
EntityManager, | |
EntityTarget, | |
ObjectLiteral, | |
SelectQueryBuilder, | |
} from 'typeorm'; | |
import { Injectable } from '@nestjs/common'; | |
import { | |
ValidationArguments, | |
ValidatorConstraint, |
This file contains hidden or 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 { | |
Catch, | |
ExceptionFilter, | |
HttpException, | |
HttpStatus, | |
} from '@nestjs/common'; | |
import { QueryFailedError } from 'typeorm'; | |
import { camelCase } from 'typeorm/util/StringUtils'; | |
export enum PostgresErrorCode { |
NewerOlder