I did two days work to run laravel-websockets on my server. It will be nice to share with you.
Laravel WebSockets can be installed via composer:
| @props([ | |
| 'viewBox' => null, | |
| 'trigger' => 'hover', | |
| 'duration' => 300, | |
| 'easing' => 'easeInOut', | |
| 'event' => 'morph-icon', | |
| 'initial' => 0, | |
| ]) | |
| <div |
| import { type RouteParameters, type Routes } from '$api/routes.js'; | |
| /** | |
| * Resolve a route without parameters | |
| * | |
| * Takes the name of a route as defined in the Laravel application and returns | |
| * the URI of the endpoint. | |
| * | |
| * @param name Route name | |
| */ |
| <?php | |
| use Illuminate\Support\ServiceProvider; | |
| use Illuminate\Database\Eloquent\Builder; | |
| use Illuminate\Support\Arr; | |
| class AppServiceProvider extends ServiceProvider | |
| { | |
| // ... |
| // | |
| // CountryCodes.swift | |
| // Created by Simon Minton on 26/10/2023. | |
| // | |
| import Foundation | |
| struct Country: Identifiable, Hashable { | |
| let id = UUID() | |
| let name: String |
| #!/bin/bash | |
| # Backups the previous configuration (optional if you take system snapshots regularly) | |
| BACKUP_PATH="/usr/share/alsa-card-profile/mixer/paths_backup" | |
| [ ! -d $BACKUP_PATH ] && sudo cp -vR /usr/share/alsa-card-profile/mixer/paths $BACKUP_PATH | |
| # The actual Perl script that disables AGC | |
| sudo perl -pi -0 -e 's/(\[[A-Za-z ]*Mic Boost\][A-Za-z._=\s-]+volume *= *)merge/\1zero/g;' /usr/share/alsa-card-profile/mixer/paths/* | |
| # Shows the changes made to the system (optional) |
| <?php | |
| function include_field_types_acf_pages_by_template( $version ) { | |
| include_once('acf-pages-by-template.php'); | |
| } | |
| add_action('acf/include_field_types', 'include_field_types_acf_pages_by_template'); | |
| // exit if accessed directly | |
| if( ! defined( 'ABSPATH' ) ) exit; | |
| // check if class already exists |
| <?php | |
| function slugify($string, $replace = array(), $delimiter = '-') { | |
| // https://github.com/phalcon/incubator/blob/master/Library/Phalcon/Utils/Slug.php | |
| if (!extension_loaded('iconv')) { | |
| throw new Exception('iconv module not loaded'); | |
| } | |
| // Save the old locale and set the new locale to UTF-8 | |
| $oldLocale = setlocale(LC_ALL, '0'); | |
| setlocale(LC_ALL, 'en_US.UTF-8'); | |
| $clean = iconv('UTF-8', 'ASCII//TRANSLIT', $string); |