While working on an interactive novel demo, I happened to need a container for containing flags (aka values that I could check later on to change bits of flavor depending on what a player chose), but I didn’t want to just use a plain ol’ JavaScript object. I wanted to create a true data container…
Programming
Laravel: Validate Fields Only When One Is Present
Sometimes, when setting up validation for Laravel forms, you need to be able to set up validation rules for two fields, but allow for one of them to be ignored if the other is filled. This is how you can set up your validation rules to make that happen.
Laravel and PHPUnit Error: Supported Ciphers
An odd error involving Laravel and PHPUnit, and searching Google found no solution…
React Error: Expected a string, got object
Here’s a React error that took me awhile to figure out.
Laravel Redirect Status Code
Laravel’s documentation doesn’t make this obvious, but when you are using a redirect you can change what the status code of the redirect is.
Wildcards in Laravel Routes
Laravel doesn’t have a way to use wildcards in routes by default. However, you can add one in by using route parameters and regex constraints. Don’t worry: it’s super-easy to set up!