Open Source

Configuring Webpack LiveReload with Laravel.mix

You probably know that Laravel.elixir was replaced with Laravel.mix in Laravel 5.4. If Laravel.elixir was based on Gulp, then Laravel.mix is built on top of Webpack. Therefore, Gulp plugins are not suitable anymore and we have to replace them with Webpack plugins. Luckily, there is a webpack plugin for those who prefer LiveReload to BrowserSync.

Webpack LiveReload plugin will automatically monitor your files for changes and refresh the page when the changes are detected. In this short post I will show you how to make it work.

Laravel-localization middlewares now support route exceptions

We usually apply laravel-localization middlewares to the entire web route group. It means that laravel-localization package redirects broadcasting/auth route to en/broadcasting/auth, which crashes Event Broadcasting.

The problem is related to the fact that Laravel Echo Server does not support redirects (HTTP statuses other than 200) of the Laravel authorization service broadcasting/auth.

It is probably possible to improve Laravel Echo Server in order to support redirects, but from my point of view it is easier to solve the problem from the Laravel side.

Code Less in Drupal 8 with Drupal Console

Drupal Console brings a whole new developer experience (DX) to Drupal 8. This console tool is similar to Drush but has some mind-blowing features, which I cannot wait to show you in action. Although, Drupal Console is in RC stage at the moment, it performs its functions well enough.

In this tutorial, we will generate boilerplate code for Drupal 8 via command line. In some frameworks this approach can be also called scaffolding. With about five lines of custom code and a few console commands we will create a fully-functional Drupal 8 module with a field formatter that will display QR codes in fields of Link type. The module will be using a third-party service to generate QR codes of entered URLs.

Benefits of Contributing to Open Source for Companies

I’d like to briefly consider the benefits for companies which spend money and time to contribute to Open Source. I’m a contributor to Drupal extensions, so I will speak in the context of Drupal extensions, but the ideas mentioned should also be applicable for other Open Source systems and products.