Configuring CORS for Laravel Public Storage

There are certain JavaScript packages that take public resources (e.g., images) and draw them to a canvas using the Canvas API. If those resources don’t have an 'Access-Control-Allow-Origin' header, then a CORS error will be thrown when the image is drawn into the canvas. Here's a method for configuring an Nginx server to add that header to resources in Laravel's public storage.

Continue Reading
Written By Rachel Opperman
Posted on

Custom Form Handler in Statamic

This past month I've been working on some pretty heavy forms in Statamic that led me down the path to some custom Statamic addon development.

Continue Reading
Posted on

Diving Into a Laravel Audit

Recently the Zaengle team was asked to look over an existing Laravel application and give a review of the overall state of the code. We were to act as an independent third party, between a new studio who had inherited the codebase, and the client, who was anticipating launching the product. The studio had some concerns about the quality of the code and wanted an independent review prior to picking up development on the project. Here are a few thoughts on the process I followed and several takeaways I had from the experience!

Continue Reading
Written By Jesse Schutt
Posted on

Eloquent "Combo" Methods

Let's take a look at a handful of what I call "combo" methods in the Laravel Eloquent Builder class that will tighten up conditionals in your code!

Continue Reading
Written By Jesse Schutt
Posted on

Exploring Laravel's Custom Blade Directives

Earlier today I was working on coding up a design that displays a varying number of cards, each with a unique title and description think masonry/pinterest-esque. I’ve been using Faker to stub out a bunch of cards, each with different content. Once I’d hooked up the dummy data to the cards, I realized that the design didn’t work as well with titles that had more than 20 or so characters.

Continue Reading
Written By Jesse Schutt
Posted on