Testes unitários para models em aplicações Laravel 10 com TestCase customizado
I will show a way to make testing your models a little bit easier using a custom TestCase.
// Path: src/modules/character/dtos/create-character.dto.ts | |
import { IsNotEmpty, MaxLength, MinLength } from 'class-validator'; | |
import { ExistsOnDatabase } from '@modules/common/decorators/exists-on-database.decorator'; | |
export class CreateCharacterDto { | |
@IsNotEmpty() | |
@MinLength(2) | |
@MaxLength(100) | |
name: string; |
// Path: src/modules/user/dtos/create-user.dto.ts | |
import { IsOptional, IsNotEmpty, MaxLength, MinLength, IsString, IsEmail } from 'class-validator'; | |
import { IsUnique } from '@modules/common/decorators/is-unique.decorator'; | |
export class CreateUserDto { | |
@IsOptional() | |
@IsString() | |
@MinLength(2) | |
@MaxLength(70) |
# Defining base image | |
FROM php:8.2-fpm-alpine | |
# Setting arguments | |
ARG user=developer | |
ARG uid=1000 | |
# Steps of this layer: | |
# - Install system dependencies | |
# - Install and enable PHP extensions |
Incluindo documentação de API numa aplicação Laravel 10 utilizando package Scribe
Scribe helps you generate API documentation for humans from your Laravel codebase.
You can learn more about the package here: https://scribe.knuckles.wtf/laravel/
We will see how to implement it.
Redis - Data types (Strings, Hashes, Lists and Sets)
Nós vamos conversar sobre as seguintes estruturas de dados disponíveis no Redis: string, hash, list and set.
Se você quiser utilizar uma aplicação online para testar seu código Redis, você pode usar o seguinte link:
Painel admin simples feito com HTML e CSS (Flexbox, abordagem mobile-first e responsividade)
Obs: Icons of Font Awesome library/toolkit were also used.
[index.html]