<?php | |
/** | |
* Return the SQL query with the bindings. | |
* | |
* @param \Illuminate\Database\Eloquent\Builder $query | |
* @return string | |
*/ | |
function getSql(Builder $query): string | |
{ |
-
No terminal da maquina execute
ssh-keygen -t rsa -b 4096
siga com enter para aceitar os valores padrões. -
Adicionar um titulo de identificação para a chave
-
Copiar a chave gerada no arquivo ~/.ssh/id_rsa.pub e colar no campo de texto
{ | |
"editor.fontSize": 18, | |
"workbench.editor.highlightModifiedTabs": true, | |
"files.trimFinalNewlines": true, | |
"editor.fontFamily": "Fira Code", | |
// "terminal.integrated.fontFamily": "FiraCode Nerd Font", | |
"terminal.integrated.fontFamily": "MesloLGS NF", | |
"editor.fontLigatures": true, | |
"editor.lineHeight": 30, | |
"workbench.iconTheme": "material-icon-theme", |
<?php | |
use Illuminate\Support\Facades\Schema; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class LaravelConditionalIndexMigration extends Migration | |
{ | |
/** | |
* Run the migrations. |
<?php | |
use ElasticEmail\Api\VerificationsApi; | |
use ElasticEmail\Configuration; | |
// API com elastic email validation https://app.elasticemail.com | |
$client = new \GuzzleHttp\Client(); | |
$apiKey = '5BD30809F3075185B5F57D0913273A4C65ACC112E0D9DCBBB7670E5F45567D7CBE05AC53B8D1B81F7B073CC5B71C133B'; |
<?php | |
try { | |
$listResults = [ | |
'ok', // All is OK. The server is saying that it is ready to receive a letter to,this address, and no tricks have been detected | |
'error', // The server is saying that delivery failed, but no information about,the email exists | |
'smtp_error', // The SMTP answer from the server is invalid or the destination server,reported an internal error to us | |
'smtp_protocol', // The destination server allowed us to connect but the SMTP,session was closed before the email was verified | |
'unknown_email', // The server said that the delivery failed and that the email address does,not exist | |
'attempt_rejected', // The delivery failed; the reason is similar to “rejected” |
Pensei muito na melhor forma de fazer um teste unitário de uma funcionalidade "maior" e cheguei a uma ideia de como montar.
Suponto que eu estou trabalhando um serviço de consolidação de comissão, nesse serviço decidimos manter a consolidação de comissão como uma função que faz parte do serviço de comissão, mas para automatizar essa consolidação criamos um comando que executara de tempo em tempo que criara um Job que sera realizado para consolidar a comissão.
Nessa comissão temos algumas configurações "payment_method", "blocked", "paid_at", "expected_date", "released_at", para criar o Job temos algumas regras, buscamos as comissões pelo metodo de "payment_method", que não esteja "blocked", que esteja "paid_at", que não esteja "released_at" e que a data "expected_date" seja menor ou igual a atual.
Esse job para consolidar a comissão precisa verificar se a comissão está "blocked", pois existem outros eventos que podem ocorrer que deixem a comissão bloqueado e comparar o dia atual com a data de pagamentos pa