Abstracting to Service Classes for Cleanliness and Reusability

As a Junior Engineer at Zaengle, I’ve learned that writing good clean code is one of the most important aspects of being a developer. There are many places in code where logic can get out of hand quickly. One such place is in the controllers. We sometimes think that the controller is simply a place to dump any logic we don’t quite know what to do with.

Continue Reading
Written By Logan Fox
Posted on
Share

Building a CSV Importer - Part 1

Importing data into a Laravel app from CSV may be accomplished in many ways... here's how I do it!

Continue Reading
Written By Jesse Schutt
Posted on

Building a CSV Importer - Part 2

In the previous article we created the CSVUpload, gathered the column mapping, and split the data into individual CSVRow records. At this point we are ready to implement the business-specific rules for integrating the data into our application.

Continue Reading
Written By Jesse Schutt
Posted on

Building a CSV Importer - Part 3

If you've made it this far, you already know that we've imported data from a CSV file, mapped the columns into our application's domain, split the data into individual rows, and set up a Laravel Pipeline to ingest the information.

Continue Reading
Written By Jesse Schutt
Posted on

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
Share