This is for Windows running PHP through XAMPP Go to https://pecl.php.net/package/ds download dll, choose 32 or 64 bit version. Note,
Author: Yvonne Lu
Laravel Multiple Database Connection
For Laravel > 5.3 Add in .env file properties of the second connection (DB_HOST, DB_PORT, DB_DATABASE, DBUSERNAME, DB_PASSWORD) Add second
Laravel Console Command
Generate the command php artisan make:command command_name Call command php artisan command:command_name –options arguments Optionally, register An Command, add yourCommand
Laravel Job and Queue
This post shows the steps on how to run queue in database using background worker process. Useful tutorials: https://scotch.io/tutorials/why-laravel-queues-are-awesome https://laravel-news.com/laravel-jobs-and-queues-101
Typescript Getting Started
Start a project npm init install typescript npm install –global typescript this will install tsc as a global command. npm
React Debugging
JSX expressions must have one parent element. Wrap all elements in render function under one <div></div> or <Fragment></Fragment> Warning: Each
Javascript Equivalent…
PHP preg_replace let phone=”+17778889999″; let p=phone.replace(/^\+1/,”); PHP isset if (typeof variable !== ‘undefined’) PHP array_pop path_arr.splice(-1,1); //note does not work
Npm install problems
Build failed because: note: Reason: cannot convert from ‘v8::Local’ to ‘const v8::String::Value’ Solution: Change Nodejs to version 10.19.0, node-sass does
Javascript Debugging Tips
To dump out random objects console.log(JSON.stringify(obj)) if that didn’t work: console.log(“my object: %o”, obj); A straight console.log(obj) will often show
Laravel Query Builder WhereRaw Example
A query builder whereraw tutorial whereRaw($sql, array $bindings = [], $boolean = ‘and’) A couple of examples: $g = TableName::whereRaw(‘LOWER(worker_location)