Assuming that you have installed php from brew. You can switch the versions between php from the script below.
Update the script as per the requirement of your versioning.
#!/usr/bin/python3 """ script to switch between php versions author: msamgan created: 22 july, 2022 additional info - make the script executable chmod +x php.switch <version> - put the script in .local/bin for global access - or run directly from terminal ./php.switch <version> """ import argparse import os import sys parser = argparse.ArgumentParser(description="Script to switch between php versions") parser.add_argument("version", metavar="Version", type=str, help="Version") args = parser.parse_args() print("Switching php version to: " + args.version) if args.version == "8.1": os.system("brew unlink [email protected] && brew link [email protected] --force --overwrite") os.system("php -v") sys.exit() if args.version == "7.4": os.system("brew unlink [email protected] && brew link [email protected] --force --overwrite") os.system("php -v") sys.exit() print("Invalid version")
AppImages are the most easiest to run compared.The challenging task is to make the AppImage accessible globally through he system like an installed application (in the menu)
#code-quality #vscode #laravel-pint #laravel
I have been using the unsatisfactory formatters from a long time. All of them have one thing but lack other. Laravel Pint is one who has it all, combining it with vscode is like proving you laravel project a super power.
#express js #node #node js #sequelize #mysql
In the very initial days of my work in Node JS if faced this issue. Though Sequelize provide a great ORM for MySQL but the association within the models is a bit tricky.
#database #javascript #sequelize #npx
list of Sequelize CLI commands which comes handy, while working on a project.
#functionality #pwa #javascript #laravel
The progressive web app is the new trend as well as the need for the present time. I hope before getting in the “HOW” part you know what is exactly a PWA