Jeffrey Harris
Posts
-
Aug 21, 2024
StoryDevelopment
Back in a previous work life, I kept getting asked the same question every morning. Since I was developing the system for the business, I wrote some code to answer the question with an automated email every morning. Each day, we would send out shipment orders to pickup office machines. The question was “when is this particular machine arriving?”
Categorized under development.
-
Apr 26, 2023
DNSBindnamed
In my multi-tenant side project, I have a plan to allow my providers to register an account for their chorus. They will then be able to forward a subdomain from their chorus domain to my service. I’m running traefik on my server to route my other domains to their respective services, while allowing this project its own specialized domains. The how of dynamically changing traefik’s routing is for a different post, but I ran into an issue last night during a deployment, that’s not related to deployment.
Categorized under Fixing the Broke.
-
Apr 21, 2023
Putting a Role on a Pivot Table
LaravelPermissionsAs I mentioned yesterday, my side project deals with choruses and their trios, quartets, and other smaller performance groups. I have some global Roles for the chorus members which can be attached to the User model, just as you would expect. A problem arises when I want to attach quartet roles to members.
Categorized under .
-
Apr 20, 2023
Testing in Tenancy For Laravel
LaravelMultiTenancytestingIn my current side project, I am using the Tenancy for Laravel package. Tenancy effectively splits your Laravel application into two parts, all with the same code base.
Categorized under .
-
Apr 19, 2023
Laravel
A Laravel many-to-many relationship uses a pivot table to connect many models to many other models. For example, a User might have many roles; he can be an
Author
, and anEditor
. Likewise, a role ofAuthor
can have multiple users.Categorized under .
-
Sep 18, 2022
Doing the same thing over and over
MakefileDuring development, sometimes you have to do the same things over and over again. Every time you do it, you expect the same results, but sometimes your fingers aren’t on the correct keys, or your brain has gone on a temporary vacation. You have to create your development environment, although
docker-compose
encapsulates that for us. I find it handy to jump into a shell running in the development container. Honestly, who wants to typedocker compose exec php-fpm bash -c "/usr/bin/php artisan tinker"
more than once a month?Categorized under Code Snippets.
-
May 5, 2022
StoryDevelopment
So I’ve always been wanting to post things, but I feel I don’t have anything to post. But I’ve been around long enough that I have plenty of stories, and a few of them might actually be interesting.
Categorized under development.
-
May 26, 2020
CLILaravel
I’m working on a project, over budget and late. To keep the development environment exactly the same as the production environment, I am running a docker stack that I originally generated over at PHPDocker.io. I have one image running the php-fpm executor, and while I’m working, it is the window into the Laravel engine. I’ve set the minimum PHP version to 7.4 to take advantage of the latest language features.
Categorized under Command Line.
-
May 23, 2020
JavaScript
One of my projects is using axios to handle AJAX calls. However, the project comes from a framework that is very opinionated as far as the front end setup. It comes with its own custom webpack setup and javascript boilerplate. It is fine to not worry about setting up your JavaScript environment when everything is built for you, but when you have a coding test or a fairly simple or short-term project that just needs to get going, you need to know how to do things yourself.
Categorized under Code Snippets.
subscribe via RSS