All blog posts by Dylan Baine
I'm a software engineer who's interested in Laravel, career development within the tech industry, and fitness. This is where I write about these things I'm interested in.
A cleaner way to dynamically style elements in PHP
If you’ve ever found yourself writing nasty inline php if statements in order to dynamically add styles or classes to your HTML, then this package might just be for you. I just released the first version of ComputedStyles php which provides an elegant API for applying styles and classes to HTML.
ReadDependency Inversion: An Example
The easiest way to make your code is more extensible is by making sure that your high level code and low level code aren’t mixed together. What’s high level and low level code? In this context, low level code would be considered code that interacts with a data store, filesystem, or third party API’s/libraries. High level code is the code that follows business logic. IE: when creating a user, check to see if that user already exists before creating it.
ReadEnsuring you dont run your Laravel test suite in production (and wipe out all of your production data).
What if you accidentally run your test suite in a production environment? Well, if you’ve been around Laravel long enough, you know what happens. You run php artisan test, you notice it’s taking a really long time, and you finally realize that is because the test is clearing out your whole database.
ReadHow to get a picture next to your website on Google search
Are you looking for ways to get your website more clicks from google search? If your website is already ranking on the first page of Google, but not getting the CTR (click through rate) that you’re wanting, getting an image to display next to your site listing could be key in getting more people to click on your website.
ReadHow to install Headless Chrome on a Laravel Forge server for chrome-php.
This post will go over how I installed chromium binary on a Laravel Forge server.
ReadHow to point a Namecheap domain at your server I.P.
This article will go over how to point your Namecheap domain at a server IP address.
ReadHow to track the speed of functions in Laravel
When looking to improve the performance of your Laravel Application, tracking is key. This article will cover the best tools available for monitoring your application performance, as well as some key techniques used to scale enterprise Laravel Applications.
ReadHow to Use JSDoc – Code Completion with JavaScript
Enhancing your JavaScript development experience can be significantly achieved by leveraging JSDoc annotations to improve code editor features like autocomplete. By providing practical tips on utilizing JSDoc, developers can write more efficient and error-free code.
ReadAsynchronous Cache in Laravel
Implementing an async caching strategy in a Laravel application is essential when you need to deliver data stored in a way that is not quickly accessible.
ReadJavascript Interfaces for C# and Java developers
As a mid to senior level engineer looking into Javascript for the first time, the lack of interfaces can be daunting. Without the safety net of an interface to ensure that your modules are properly integrated, how to you ensure compatibility?
ReadJavaScript Interfaces (Without Typescript)
In software, Interfaces are helpful in many ways. In this post, I’d like to share my thoughts on one reason that they are helpful, and how we can leverage them in JavaScript–without TypeScript.
ReadLaravel Scheduler: how to send command output to STDOUT.
If you rely on stdout for your Laravel logging for services like Data Dog or New Relic, you’ve likely ran into an issue where you can’t see the output of your Laravel commands that are called by the scheduler. In this post you’ll find that there is an easy solution to this issue.
ReadMy Girlfriend Saved My Career
After dropping out of college twice and working several dead-end jobs, I struggled to find my place in the world.
ReadProperties in PHP interfaces.
Unfortunately, no. There is no current versions of PHP interfaces support properties.
ReadScaling Laravel Sanctum
At Sweetwater, we leverage Laravel Sanctum for API authentication in some of our service. In this post, I’d like to share with you what we did to make sure that Laravel Sanctum wouldn’t slow down the millions of requests we handle a day.
Read