Sign in

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

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: https://github.com/laravel/octane

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: https://robertodev.medium.com/laravel-octane-is-here-9ce026f6180e

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: https://vitejs.dev/guide/.

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: https://medium.com/swlh/my-first-vue3-component-6e1ef1670544

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 ( https://github.com/features/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: https://github.com/Hi-Folks/gh-actions-yaml-generator . You can use a demo here: https://ghygen.hi-folks.dev/

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.

Why?


Creating a workflow for GitHub Action is quite easy. You need to understand how the “GitHub Workflow” process works and then you need to create a Yaml file to define your workflow configuration.

You could start from:

So, once you are able to start to write your workflow Yaml file, probably you would need a support in your editor, while you…

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