Mohamed Said's Journal

Web Developer, cyclist, and freediver.

Testing Artisan Commands in Laravel 5.7+

Posted on August, 25 2018 in Code

Laravel 5.7 comes with a pretty neat way for testing console commands, let's see how our tests might look like.

Read More

I broke my collarbone, here's the story

Posted on August, 20 2018 in Life

On July 22nd, I took my bike out for a ride, crashed 5 minutes away from home and broke my right collarbone. I wasn't doing anything special, just riding downhill on a paved road and all.It all happened so quickly,...

Read More

My money dilemma

Posted on April, 15 2018 in Life

My father made terrible money mistakes in the past, my nightmare is that I’ll end up making the same mistakes because I generally think like him.Don’t get me wrong, I think my father is great, in fact my dedication at...

Read More

Better 404 responses using Laravel 5.5+

Posted on September, 21 2017 in Code

Laravel 5.5.10 is shipped with two useful router methods that'll help us present better 404 pages for our users...

Read More

Persisting Redis data on disk

Posted on August, 9 2017 in Code

Redis data lives in memory, that makes it is very fast to write to and read from, but in case of server crashes you lose all that's in the memory, for some applications it's ok to lose these data in...

Read More

Using Laravel Mailables and Notifications as Event Listeners

Posted on May, 16 2017 in Code

Most of the time we send alerts to our app users when a specific event happens, for example we send an invoice on a new purchase or a welcome email on user signup, and to do this we need to...

Read More

Conditionally pushing event listeners to queue

Posted on May, 5 2017 in Code

Here's the situation, you're building an online store that should handle thousands of orders every day, one of the cool things about this store is that customers who make purchases above 10K should receive a gift coupon, let's see how...

Read More

How losing hope is one way of getting better

Posted on January, 18 2017 in General

Last year I realised that losing hope isn’t a bad thing:People think it’s shameful to lose hope, I learned that the sooner you lose hope the better, losing hope means you start considering alternatives & deploying your negative energy toward...

Read More

Laravel/MySQL JSON documents faster lookup using generated columns

Posted on July, 9 2016 in Code

laravel 5.3 is shipped with built-in support for updating and querying JSON type database fields, the support currently fully covers MySQL 5.7 JSON type fields updates and lookups, this allows us to have the following...

Read More

Conditionally adding instructions to laravel's query builder

Posted on April, 25 2016 in Code

How to conditionally push extra instructions to the query builder using the same fluent syntax that you love.

Read More

Building and testing Artisan Commands

Posted on April, 9 2016 in Code

While building the Laravel Langman package I was facing some difficulties trying to figure out how to test a console command that interacts with the user via questions, most of the tutorials and blog posts I found online...

Read More

MySQL JSON data type decoded

Posted on March, 11 2016 in Code

In this post we are going to explore the new MySQL 5.7 JSON Data Type. While diving into the topic we are going to use Laravel's fluent query builder.

Read More

Eliminate the noise & hear the little voices

Posted on February, 6 2016 in Noise

I always believe in letting my product do the talking, I find myself unable to express what I’ve been doing or am doing, during meetings I’m the one who has nothing to say about productivity/progress/achievements and all these shiny words.My...

Read More

The sad fact about everyone I know leaving Egypt

Posted on December, 24 2015 in Life

In the past few months I said goodbye to many of my friends and colleagues who used to work in the tech/startup field in Egypt, they all moved to Europe looking for a better chance to make progress in their...

Read More

How leaving school made me a better learner

Posted on December, 11 2015 in Life

It all started as a traditional story, I left school because I had to work to support my family, back then I didn’t feel special about myself, I always thought I hated the reasons that drove me into this, I...

Read More

We don’t want our child to be born on the wrong side of the wall

Posted on December, 8 2015 in Life

I can never say my childhood was bad, It was lovely indeed, I was able to do all the activities a child or a teenager ever wanted to do, and I never thought I will end up having these thoughts...

Read More