Blog

Using Eloquent Query Scopes in Laravel
Using Eloquent Query Scopes in Laravel

If you are writing eloquent queries in your Laravel project and find yourself writing the same logic in your queries over and over again then query scopes might be of use to you. Scopes offer you a way of extracting a part of a query from your controller and into your model to simplify your queries and keep them cleaner.

Creating my first npm package
Creating my first npm package

I’ve been a web developer for over 12 years now and I use so many different npm packages every day throughout both my day job and my side projects, but I had never made my own npm package before. I decided that I wanted to see what it’s all about and how you go about creating your own package and deploying it to npm.

Lessons learned designing the Showcase layout for Bulma Clean Theme
Lessons learned designing the Showcase layout for Bulma Clean Theme

I was thinking about what features I could add to my Jekyll theme and it occured to me that I didn’t really promote my theme very well on my own website. As my website uses Bulma Clean Theme it gave me a good opportunity to create a new feature for my theme, that I could end up using to promote my theme. A bit of a win, win situation.

Development is like a jigsaw puzzle
Development is like a jigsaw puzzle

Last week I decided to buy a jigsaw puzzle and as I was building it, I had a thought that puzzles share a lot of the aspects of development. After all, a jigsaw puzzle does require a lot of problem solving skills.

Streamlining your code deployment
Streamlining your code deployment

One of the scariest things as a developer is pushing new code live, hoping it all works as expected and remembering to do all the deployment steps and in the correct order too! But luckily there are some steps you can take to make it easier, which will probably have an unexpected side effect of allowing you to push your code more often.

Creating a simple report in Laravel
Creating a simple report in Laravel

Recently I was tasked with creating a report in a Laravel project and I thought I would share some of the things I learned along the way. I’m going to use a shop as an example with an orders table that contains the orders, but these principles should apply to pretty much any report. Firstly I want to get the number of orders for the previous week and then I want to get a count of orders by week and year so I can put this data into a report.

Latest Posts

Using when with the Laravel Http Client
Using when with the Laravel Http Client

Here’s a little tip I discovered that I haven’t seen documented anywhere. You can use when() and unless() with the Laravel Http client.

New book announcement!
New book announcement!

Announcing the new book, The Little-Astwick Mysteries - Trouble at the church, by C.S. Rhymes. It is now available for pre-order on the Amazon Kindle store for £2.99, with the release date of the 1st February 2024.

Using prettier to format your Jekyll theme
Using prettier to format your Jekyll theme

I have been using prettier for a few years to automatically format code, especially JavaScript and TypeScript projects, as it helps standardise the output on a shared code project. I have maintained a few different Jekyll themes over the years and wanted to use the power of prettier to automatically format code consistently.

How NOT to make a website

How NOT to make a Website

By C.S. Rhymes

From £2.49

Nigel's Intranet Adventure

Nigel's Intranet Adventure

By C.S. Rhymes

From £2.99