Skip to content

Instantly share code, notes, and snippets.

View thallisphp's full-sized avatar
⚒️
Developing with Laravel for Doc88

Thallis Ferreira Soares Casemiro thallisphp

⚒️
Developing with Laravel for Doc88
  • Doc88
  • São Paulo
View GitHub Profile
UPDATE `tabela`
SET `data`= DATE_FORMAT(STR_TO_DATE(`data`, '%d/%m/%Y'), '%Y-%m-%d')
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/thallis/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
{"cor":"#FC0"}
@thallisphp
thallisphp / exemplo.php
Last active May 17, 2023 18:55
PHP - Enum com descrição por atributo - Enum with description by attribute
<?php
#[Attribute(Attribute::TARGET_CLASS_CONSTANT)]
readonly class Descricao
{
public function __construct(
public string $descricao,
)
{
}
@thallisphp
thallisphp / UfEnum.php
Created June 5, 2024 14:46
Enum de Unidades da Federação do Brasil (Estados)
<?php
namespace App\Enums;
enum UfEnum: string
{
case AC = 'AC';
case AL = 'AL';
case AP = 'AP';
case AM = 'AM';