Sign in

I’m technophile. Vuejs and Laravel enthusiast! #vuejs #laravel. I love #coding

RandoPHP is a PHP open source package for generating random numbers, characters, strings and sequences. With this package you can:

  • Draw: Extract random items (sample) from an array. This is useful when you want to “draw” some numbers or items;
  • Generate: useful for create random items like integer, byte, boolean, float, lat/long coordinates, char (numeric, alphabetic, alphanumeric), and sequences like array of integer or char.

With a fluent interface, you can control some behavior like:

  • minimum and maximum value;
  • how many items you want to create;
  • for sequences if you want or not duplicates (for example in the array [1,5,3,1,1]…

With Laravel Octane you can serve your Laravel application using a powerful Application Server for PHP, like Swoole and/or Roadrunner.

Laravel Octane has the responsibility to boot correctly your application once, keeps it in memory, it cleans object states and manages the instance of the objects across the requests.

You can obtain source code of Laravel Octane here:

Normally, the application and all objects are instanced once for each request. With Laravel Octane the application , the framework instance and the object instances are shared across the requests. …

I can’t wait for Laravel Octane, so I started playing with Laravel and Roadrunner.

On 6th April 2021, Laravel Octane Beta is released, so this article is obsolete. My suggestion is to use Laravel Octane with Roadrunner. To do that, you can follow this post:

During Laracon 2021 🎉🎉🎉, and after Taylor’s great “Laravel Octane” speech, I was super excited about serving Laravel application with an Application Server with multiple workers.

Under the hood Laravel Octane could be used with Roadrunner, so I decided to play a little bit directly with Roadrunner.

What is Roadrunner: Roadrunner is an Application…

Setup a Droplet for Laravel 8

My goal is to setup a GNU/Linux VM with Ubuntu 20.04 LTS, PHP8, Nginx and MySql to serve a Laravel 8 Application. For the Web Server I’m going to use Nginx so I will need php-fpm.

There are some ways to achieve that, you could consider to use:

For my side projects usually I use DigitalOcean Droplets because:

  • it is a “manual” approach, but one of my…

Vite is a new frontend build tool that aims to improve the developer experience for development with the local machine, and for the build of optimized assets for production (go live).

Vite (or ViteJS) includes:

  • a development server with ES _native_ support and Hot Module Replacement;
  • a build command based on rollup.js to output highly optimized static assets for production.

If you are interested in Vite my suggestion is to start reading the official doc, “Getting Started” chapter:

Vite is developed by the creator of VueJS. But one of the most important feature of Vite is that is frontend…

Using PHP8 with Docker

If you want to try the new release of PHP 8 and you want to install it on your local machine without having side effects on your current PHP projects and your current PHP 7 stack, I have some suggestion for you.

I think that the safest and quickest way to install and use PHP 8 is running PHP in an isolated environment. To achieve that, you can use a Docker image with all things needed by PHP runtime avoiding negative impact or conflicts with your current local PHP 7 installation.

Install Docker

In order to install Docker , if you have…

Using ref() or reactive() — Vue3

In my previous post, I implemented my first Vue3 component.

I implementend a very simple web app (roll the dice) where I had a “div” where to show the result and a button to trigger the roll and generate a random number from 1 to 6.

In that case, I used “ref()” to create reactive properties.

“My first Vue3 component” article where I used ref() for declaring reactive properties:

The ref() “approach”

For example in “setup()” function of my component I declared “dice” property in order to store the last result of the roll action.

My first Vue3 component: vite, composition API, ref(), computed(), setup()

I like to work with Vuejs, and today I tried to use the next version of Vuejs: Vue3.

My first question was: how can I create a new Web Application with Vue3 and the right npm dependencies?

To do that, I used Vite as build tool. Vite is an amazing web dev build tool that serves your code via native ES Module imports during dev and bundles it with Rollup for production. Vite uses Vue3. So if we use Vite we have an amazing fast build tool and we have all vue3 dependencies ready to use.

Install the skeleton for Vue 3

In order to install…

GitHub Actions ( is a powerful service provided by GitHub for continuous integration and continuous delivery.

GitHub Actions allows you to execute some commands when a GitHub event is triggered. For example you can automate the execution of unit tests on your code base when you push your code in the repository.

I created an Open Source tool for creating GitHub Actions workflow for Laravel application. The source code is: . You can use a demo here:

With GitHub Actions you can:

  • setup your runner or container (with your stack: database, compilers, executables, web server…);
  • fetch your…

LaraLens: Laravel artisan command to inspect configuration and runtime parameters

LaraLens is a Laravel Artisan Command to show you the current configuration of your application. It is useful to show in your terminal the status of:

  • some useful configuration variable;
  • the connection to the database;
  • the tables in the database;
  • the connection via HTTP request.


Roberto Butti

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