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
Category: Web
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
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)
Laravel Query Performance
Here’s a way to assess the performance of a query: Start tinker in the Laravel project directory php artisan tinker
Laravel Eloquent Collection Tips
Adding a column with constant value to existing collection: $existing_col->map(function ($col) { $col[‘url’] = ‘http://your.url/here’; return $col; }); To add
Common URL Fillter
ASCII encoding Reference: Your browser will encode input, according to the character-set used in your page. The default character-set in
Laravel Migration
Note: when creating a table with automatically increasing id, for example: $table->increments(‘id’); The type created in a Mysql table is
PHPStorm Quick Keys
Note: I don’t think letters are case sensitive Show class methods- CNTRL+F12 Code settings CNTRL+ALT+S (can set to psr-12 style)
MYSQLI on PHPStorm Build In Web Server
PHPStorm has a build-in web server running at default port 63342. It works fine in general browser files such as