Laravel Sanctum optional route authentication and guard selection

Posted by Danny Herran on Jan 18, 2022 in Backend | No comments
Laravel Sanctum Logo

By default, Laravel Sanctum token authentication will either completely block access to protected routes or allow it at the expense of not being able to detect if the user is logged in. However, there are valid scenarios whereby a route should be accessible to guests and at the same time allow bearer token authentication. One of the many ways to achieve this is by changing the default guard assigned to the /api route group.

Tailwind CSS with Parcel v2

Posted by Danny Herran on Aug 28, 2021 in Frontend | No comments

Getting Tailwind to compile with Parcel v2 is easier than ever. We will leverage the Parcel v2 PostCSS support to automatically compile Tailwind assets with little configuration.

Stay Meta – a social platform for gamers

Posted by Danny Herran on Jul 30, 2021 in Social Networking | No comments

Reddit, Twitter, Twitch, and YouTube. Gamers and content creators alike use social media platforms to upload their content and stay in touch with their followers. But what if there was another way to condense them into a single, centralized location where all gaming content could converge? This is where Stay Meta comes in.

Laravel reCAPTCHA v2 Middleware in 3 minutes

Posted by Danny Herran on Nov 5, 2020 in Backend | No comments
Laravel reCAPTCHA

I needed to add reCAPTCHA v2 to a couple of forms and most of the results on Google pointed to these large Composer packages that were simply too much.

This article will cover how to do create a new Laravel Middleware to validate reCAPTCHA v2 requests with just a few lines of code.

Time to read, implement, QA and deploy to production: 3.141592 minutes.

Laravel Fractal pagination with simplePaginate

Posted by Danny Herran on Mar 8, 2019 in Backend | No comments
Laravel Fractal

By default Fractal has native support for Laravel::paginate. Those using simplePaginate() have to resort to either using Fractal Cursors or build their own adapter. In this post, we are going to quickly build an adapter that fully supports Laravel::simplePaginate.

Redux or MobX: What I learned after refactoring a medium-sized React app

Posted by Danny Herran on Mar 17, 2017 in Frontend | 6 comments

React with Redux and MobX

State containers are a must for medium to large-sized React applications. The basic idea is to keep the state abstracted from your components and manage it somewhere else. Using a state container like Redux or MobX allows you to share a global centralised state across all your components.

This article is not a tutorial per se but a list of takeaways, pros and cons of each library and the impact on an existing React application.

State of affairs: Bootstrap 4 vs Foundation 6.3

Posted by Danny Herran on Mar 28, 2016 in Frontend | 63 comments


Bootstrap 4 and Foundation 6 are the latest versions of the most widely used CSS frameworks out there. Foundation 6 is stable whereas Bootstrap 4 hasn’t been released yet. However, before you wonder why I am comparing a stable framework version vs an alpha one, let me set the record straight by saying that Bootstrap 4 may be very well used as a daily driver. Let us explore the current status of both frameworks, their features, flaws and decide which one is better suited to your needs.

This is how you upgrade (or downgrade) the PHP version on EasyPHP for Windows

Posted by Danny Herran on Nov 18, 2015 in Backend | 2 comments

Since August 2015, the EasyPHP developers have moved their modules into a called “Warehouse” in which they will host up to date modules for their famous WAMP server. This Warehouse is now subscription based, and if you want to download a module, say, the latest or an old PHP version, you will need to pay for it.

EasyPHP will remain free, is just the modules for customisation that are now under the subscription model. However, if you only want to update your PHP version to any in specific, just follow the steps below.

These are the frontend web development tools that you should be using right now

Posted by Danny Herran on Nov 14, 2015 in Frontend | No comments


If you like to be on top of the latest frontend technologies, then this is the right post for you. Let us go through the most widely used frontend tools that will help you boost your productivity by leaving the hard work into their hands. All these tools are console based, so make sure you have at least Windows PowerShell installed if you are not on Linux or MacOS.

Why are frontend web development technologies so broken?

Posted by Danny Herran on Apr 3, 2015 in Frontend | No comments


If you have worked in frontend web development lately, you probably have realised how messy the whole thing is. From languages that compile on top of other languages to the ridiculous amount of frameworks that are published every day. In fact, you are probably already struggling to keep up; but trust me. you are not alone. Let’s take a look at what is going on and how we got here in the first place.

Seamlessly validate forms and file uploads with CodeIgniter

Posted by Danny Herran on Jul 12, 2014 in Backend | No comments

Form Validation CodeIgniter

The Form Validation class is great to validate simple input fields such as textareas, checkboxes, text fields, etc. But what about file inputs? If you have a mix of text and file inputs, your controller can get messy if you try to validate both. Lets take a look at a neat solution that only involves extending your Form Validation class.

This is how it all started

Posted by Danny Herran on Sep 13, 2013 in Other Stuff | 1 comment


In the following article I want to relate how I started in the programming and web development industry, how I learned to code and build websites from scratch. Why did I write this you may ask? So I don’t forget. Time makes you forget things. My 28th birthday was close and I wanted to keep track of my professional development so I could read about it in the future. If you have ever kept a diary, you probably know how amazing it is to read your own stories as you grow up. Life has the tendency to move things around, but writing about it is the best way to keep everything almost intact for your future self. Anyway, lets get started!

How to load and use SimplePie 1.3+ with CodeIgniter 2.1+

Posted by Danny Herran on Jun 18, 2013 in Backend | 3 comments

SimplePie RSS CodeIgniter

The famous RSS parser, SimplePie, has changed a few rules in the last couple of versions. The previous methods used to install the library in CodeIgniter are now obsolete. Lets take a look at the new method to get it working in just 5 minutes.