Web Development

Posts about Web Development.

Start WSL2 services on Windows startup

Updated 16th August 2022

Start Windows Subsystem for Linux services

In some circumstances, you may want to automatically start your WSL2 (Windows Subsystem for Linux) services on Windows startup such as Apache2, Nginx, and MySQL. Follow along below to learn how to start your services when you boot your machine. Create a startup script The first step is to create a startup script. This is

How to use Microsoft Graph API with Laravel

Updated 16th August 2022

Microsoft Graph is a gateway to data and intelligence within Microsoft 365. Microsoft Graph is great to build apps for organizations and consumers using the vast amount of data stored in Microsoft 365. In this post, we are going to integrate with Microsoft Graph API in Laravel to get all users assigned to your tenant.

Understand Angular Decorators – What is a Decorator in Angular?

Updated 29th March 2022

Angular

Decorators are a core concept when developing applications with Angular. Angular.js, Angular’s predecessor, didn’t use Decorators, opting to use methods such as .component() instead. In this post, I will help you understand Angular decorators. What is a Decorator? A Decorator is a special kind of declaration provided by TypeScript that can be attached to a

Alternative ways of doing the same things in Laravel

Updated 29th March 2022

Laravel Alternative

Laravel is a large framework, with contributions coming from almost 2000 developers worldwide. Over its 10 year journey, there have been additions to the framework to do the same thing, only shorter. In this post, I have highlighted some alternative ways of doing the same things in Laravel. How to get the authenticated users id

The Ultimate guide to create Apache2 Virtual Hosts (2022)

Updated 16th August 2022

Ubuntu

In this post, I will be creating Virtual Hosts for Apache2 on WSL2 (Windows Subsystem for Linux). Follow along with this Ultimate guide to create Apache2 Virtual Hosts. The steps in this tutorial can be carried over onto any environment running Apache2. What we’ll cover Creating the directory structure Creating a symbolic link in Ubuntu

Laravel Undefined Constant header_x_forwarded_all after upgrading Laravel version

Updated 2nd October 2023

Laravel Trusted Proxies

Have you upgraded your Laravel application from Laravel 8 to Laravel 9 and received the “Undefined Constant llluminate\Http\Request::HEADER_X_FORWARDED_ALL” error when running composer update? The error is caused by Laravel dropping the Fideloper/proxy package in Laravel 9, and it can be easy to miss on the official documentation. As of Laravel 9, Fideloper/proxy has been incorporated

[Solved 2022] Laravel 419 page expired after login

Updated 23rd March 2022

Laravel

Laravel is the most popular PHP framework, dominating the space since 2014, and the chosen framework by many new PHP developers. Many new developers run into the same errors when first using the framework, the most common being a 419 Page Expired error.  What is CSRF? Cross-Site Request Forgery is a type of attack which

What are next-gen image formats?

Updated 17th March 2022

IKnowThatNow

Google Page Insights is a useful tool used to report on the performance of webpages on both mobile and desktop devices and provide suggestions on how the page can be improved. A common suggestion many websites are given is ‘Serve images in next-gen formats’, but what are next-gen image formats? Next-gen image formats provide superior

React JSX Error – Adjacent tags must be wrapped in an enclosing tag

Updated 17th March 2022

React

React is a popular and powerful library used by developers across the world. Initially released by Facebook in 2013, React has seen widespread adoption for its faster rendering, stable code and its helpful developer tool set such as the React Developer Tools browser extension for Chrome and Firefox. However, there are a number of reasons

What is a CDN and should you be using a one?

Updated 16th August 2022

IKnowThatNow

In this post, we are going to take a closer look at how CDN’s (Content Delivery Networks) work and what the advantages and disadvantages are of using a CDN to delivery your users static assets such as images, CSS files or JavaScript files. You will learn what a CDN does exactly, how it can prevent

Pixel Tracking in PHP

Updated 16th August 2022

PHP

When creating email campaigns, it’s important to know how many recipients actually opened your email. This information can help you determine if your efforts are working or if it’s time to change your strategy. Most mail champaign tools such as Mailchimp and SendInBlue use a technique called Pixel Tracking. In this post, you will learn

[UPDATED 2022] Change PHP version on Ubuntu, Linux

Updated 23rd August 2022

PHP

In this post, I will show you how to switch PHP version on Ubuntu, Linux. If you are developing on Windows, follow this guide to set up Windows Sub System for Linux. What will be covered: Change PHP version for Apache2 Change PHP version for Nginx Change PHP CLI version In this example, we will