Limit one session per user in Laravel 5

Laravel 5 does not limit the number of sessions a user may have open, so the web application may be open in several browsers of several computers.

In a project in which I am participating we need that the user can only have an active session, so if it is authenticated in a browser, the rest of sessions have to disappear, so the user can not use the web application in the other browsers, except in the last one. The example is developed with Laravel 5.4.

Limitar a una sesión por usuario en Laravel 5

Laravel 5 no limita el número de sesiones que puede tener abiertas un usuario, por lo que puede tener abierta la aplicación web en varios navegadores de varios equipos.

En un proyecto en el que estoy participando necesitamos que el usuario solo pueda tener una sesión activa, con lo que si se autentifica en un navegador, el resto de sesiones tienen que desaparecer, con lo cual no podrá usar la aplicación web en el resto de navegadores, excepto en el último. El ejemplo está desarrollado con Laravel 5.4.

How to show the Laravel version of a project?

If you want to show the Laravel version of a project, you can use the command:

$ php artisan --version
Laravel Framework 5.5.32

This command gets the version from a constant in a file placed in the vendor\laravel\framework\src\Illuminate\Foundation\Application.php file

class Application extends Container implements ApplicationContract, HttpKernelInterface
{
    /**
     * The Laravel framework version.
     *
     * @var string
     */
    const VERSION = '5.5.32';

Laravel Homestead TTFB very high

I use Laravel Homestead to develop on two machines. I use it because with this solution I have the same development environment in all my machines and in all machines of my coworkers.

Last Tuesday, with the monthly Microsoft update (I suppose), the HTTP responses starts to become very slow, with TTFB (time to the first byte) from 4 to 10 seconds.

Larevel error. The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths

If you are installing a new Larevel project and you get this error in the navigator

RuntimeException in compiled.php line 13506:
The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.