Image with some unreadable code by Markus Spiske on Unsplash

This article explains you on how to use phpDoc, to make your own Laravel code a more easy to read. I do note that some tips can also be applied for other PHP projects like Symfony, WordPress, Drupal but a bit differently.

If you been using Laravel for a while, you must know that Laravel Models uses a lot of magic methods like __get and __set. These are used to access your values, which has been fetched from your database.

Photo by Stephen Phillips — on Unsplash

When it comes to hosting there are many different options, you could go for shared hosting, or use an online cloud hosting like Amazon.

But in some considerations you should chose for Shared hosting, but when exactly?

What is shared hosting?

A shared hosting is a service, where you can host your own website or application on it. Instead of using a personal server, you’re hosting it — on a machine shared with other companies.


All of these websites are using the same resources like bandwidth, and this the reason why this is the cheapest solution.

What is cloud hosting

Now, while we will primarily focus into shared…

Photo by Fikret tozak on Unsplash

Ok, most of the time you to give your customers full access to every block type. But sometimes it’s better to disable certain block types like file, video file, …


There can be multiple reasons why for you to disable specific block types, in your WordPress theme.

Media files

You should avoid letting users upload video files. This may cause problems in the future. That may result in uploads of hundreds of megabytes, uncompressed video.

Resulting in the customer ordering more storage for uploads.

Bottom line, always store videos or songs on Vimeo or SoundCloud.

There is no design

Your design may have no design for…

Photo by Ben on Unsplash

In this article I compile a few tricks that you won’t read the official documentation. Here are some small tricks on how you could handle requests differently.

#1 Change rules depending on the method

You can avoid a lot of code duplication by writing everything in one request, that does both validations for creating and updating.

In the example below, you list the base fields like the first name and make some of them required.

When you start as a beginning front-end developer and are so green behind your ears (a Flemish proverb that sounds weird in English), you’ll look for ways to improve your code.

Read a bunch of articles on how to improve and write more readable code, and in the beginning, you may write something like this.

So what exactly is the problem with my code sample? Well, a lot of this code is redundant and it is repeating specific CSS-properties like text, border, background-color that are all related to colors.

Luckily CSS has a useful CSS-property currentColor, that acts like…

You may not or be a fan of the new Gutenberg in WordPress. This feature is an important improvement when you compare it to a WYSIWYG editor. This new editor makes writing content for blogs with columns, tables, images, and galleries.

What are some of the improvements with Gutenberg editor?

  • Page builder
  • Embed videos
  • Create columns
  • Galleries
  • Reusable blocks

When you are building a hybrid application or Single-page applications (SPAs), you will notice that pageview tracking won’t work out of the box like a normal website.

  • Data layer push isn’t working
  • GTM triggers won’t work
  • Debugging is a hassle
  • Or Ionics Tag Manager plugin isn’t working in the latest version of Ionic

Code that won’t work

Before reading this article you may have attempted triggering page views with tag manager or by listening to your router in the AppComponent and tried triggering virtual page views with datalayer push.

Guess what, nothing is happening and your there is not activity on your Google Analytics…

Bastiaan Dewaele

Senior back-end developer in Ghent who likes writing sometimes weird / creative solutions to a specific problem.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store