Skip to content

Instantly share code, notes, and snippets.

View benjamintemitope's full-sized avatar
🎯
Focusing

Benjamin Franklin benjamintemitope

🎯
Focusing
View GitHub Profile
@echr
echr / Whatsapp Botman Driver
Last active May 29, 2023 13:37
Simple Botman Whatsapp Driver
<?php
namespace Drivers\Whatsapp;
use BotMan\BotMan\Exceptions\Base\DriverException;
class WhatsappConnectionException extends DriverException
{
}
@markjaquith
markjaquith / Laracon US 2023.md
Created July 20, 2023 21:29
Rough notes from Laracon US 2023

These notes are super rough, and I didn’t take notes for a couple sessions. Let me know if you found them useful or they helped you remember things presented at the conference! @markjaquith on Twitter.

Pest PHP

by Nuno Maduro

[!question] How do snapshots work in CI? Won’t there not be an existing snapshot when the tests run?

Cool new features

@lysender
lysender / htmx-allow-400-errors-swap-for-validation-errors.md
Created August 19, 2023 13:49
HTMX - Allow HTTP error 400 and 422 swap content to enable showing validation errors

Still a newbie to HTMX.

I was writing some form submit interaction and realized that HTMX won't swap/render if the HTTP status code is not 2xx.

For 404, 500 or 503 errors, I think it's fair enough.

For my use case, I'm returning error 400 or 422 for validation errors. I'm returning the form back with some error decorations for example.

According to the docs, I can change that behavior.