Development

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.

Realtime Apps With Laravel Echo: Tips and Tricks

Some time ago, I had the pleasure of developing a realtime app for my client. The app was based on Laravel, Node.js, Redis and Laravel Echo. During the process of development, I found a few things that can be not so obvious to developers who just started to tackle the problem of creating a realtime app with Laravel. In this post I’ll share my insights.

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.

Convert Laravel Tables from MyISAM into InnoDB

Some developers don't even know what MySQL storage engine is, and they don't need to know that today because the decision on what to use is made for them by framework developers. For example, Drupal uses InnoDB for its tables. It was not always that way though. I remember the time when we had to convert Drupal 5 tables into InnoDB on a site with intense load. It was so long ago, maybe in my previous life.

Until today, I thought (or I wanted to think) that all modern PHP frameworks use at least InnoDB by default (there are newer storage engines). It turned out that I was wrong. Today I noticed that tables of the Laravel 5.2 application I worked on were in MyISAM. You can’t even imagine my confusion.

A Quick Practical Intro to Vue.js

Vue.js Logo

You may have heard of or used such JavaScript frameworks as React, Angular and Ember. They are quite popular and have their pros and cons. I personally worked with Angular 1 and learned basic principles of others. You know there is no ideal framework, but there is one framework that I like more than others. It’s Vue.js

Vue.js (pronounced /vjuː/, like view) is a library for building interactive web interfaces. The goal of Vue.js is to provide the benefits of reactive data binding and composable view components with an API that is as simple as possible. (from docs).

Vue.js is used by many companies and people across the globe. The thing that attracts me more is that a few open source products believed in Vue and included it in their code base. The products are Laravel, PageKit and some others.

In this quick tutorial we’ll create a simple Vue.js component that will calculate the length of a word and display it on the fly. Let’s get started...

Three Simple Servers for Your Front-end Projects

We can't open index.html file of some front-end projects in a browser because it requires a web server with a virtual host configured. On the other hand, configuring a separate virtual host for every front-end experiment is a waste of time. Of course, you can automate it but today you don't have to.

I'll show you how to run a simple web server using PHP, Python or Node.js with one command. Here we go.

Drupal Is a Developer's Toy

Children Playing with Toys Photo

When I was younger, I was fond of experimenting with different kinds of operating systems and applications. The internet connection was, politely speaking, not so good. So my parents regularly bought me a Russian magazine, called Hacker, which contained a DVD disk with a number of shareware and freeware utilities for everyday use. Oh, I remember how eagerly I waited every new release of the magazine and then spent days carefully learning the content.

Susyboot - Bootstrap Grid Replacement Powered by Susy

Grid Series no. 1 Image

I like Bootstrap because, with this framework, I do not need to think about how to name grid classes. This decision has already been made for me. From project to project, my content manager and I know exactly which classes we should use for building a table of three columns. Those classes are even supported by WYSIWYG editors. Also, there are many good CMS plugins, which depend on the Bootstrap grid classes, for example Panels Bootstrap Layouts for Drupal.

Susy is light and flexible and I love it for that. With Susy, I build the grid the way I prefer by naming grid classes as it is required by the application context. And that’s awesome. However, my content manager is not very fond of Susy because she has to put some effort into splitting the article content into three columns and make it look nice on mobiles in case of using Susy.

Manipulating Views Programmatically

To create a custom presentation management dashboard for Showerma v2 I have learned how to clone, edit and delete views in Drupal 7 programmatically. Now I am going to share the results of my research.

There is plenty of articles about Views hooks on the net, but this one is not about the hooks.