Skip to content

Instantly share code, notes, and snippets.

Laravel and Soketi locally(with Valet) and production(with nginx reverse proxy)


locally (Valet)

Soketi

install soketi:

npm install -g @soketi/soketi

Create a JSON file to run with Soketi. Create a file named soketi_config.json for example and add the following content:

Deployer issues with ubuntu server and github:

In case of git@github.com: Permission denied (publickey)

on local machine do the following

  • Add the SSH key to the ssh-agent -- Start ssh-agent in the background run:
eval "$(ssh-agent -s)"

The error that this solution fix:

Get:4 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease             
Err:4 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)

Go the to the source list folder:

Based on sjones6 Gist

const isDark = ref();
isDark.value = localStorage.getItem('darkMode') == 'true';
function toggleDarkMode() {
  isDark.value = !isDark.value;
  localStorage.setItem('darkMode', isDark.value);
}

Get thg latest git tag + latest commit date and hash and use it as a laravel app version

Based on TALL Stack Tips

config/version.php

<?php

use Symfony\Component\Yaml\Yaml;

Microsoft ODBC driver for SQL Server (Ubuntu)

sudo su
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -

curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list

sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18