Skip to content

My memo Wall

A collection of my tech notes

  • Home
  • AWS
    • Bitnami
    • Lambda
    • Serverless
    • Step Function
    • DynamoDB
    • Kinesis
    • Elastic Search
  • Language Specific
    • Python
    • Perl
    • C#
    • Java
    • Visual Basic
    • Node.js
  • Web
    • JQUERY
    • PHP
    • Apache
    • CSS
    • Demo
    • AJAX
    • HTML
  • Git
  • OS
    • Android
    • Windows
    • Linux
    • Shell Script
  • Database
    • Foxpro
    • Postgresql
    • MYSQL
    • SQL
    • snowflake
  • Open Source ERP
    • Dolibarr
    • OfBiz
  • EDI
  • Twilio
  • General
    • Bar Code
    • Domain
    • Email
    • G Suite
    • Slack
    • wiki

Category: PHP

Javascript Equivalent…

October 8, 2020 Yvonne Lu Javascript, PHP

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

Continue reading

Laravel Query Builder WhereRaw Example

September 1, 2020 Yvonne Lu Laravel

A query builder whereraw tutorial whereRaw($sql, array $bindings = [], $boolean = ‘and’) A couple of examples: $g = TableName::whereRaw(‘LOWER(worker_location)

Continue reading

Laravel Query Performance

September 1, 2020 Yvonne Lu Eloquent, Laravel

Here’s a way to assess the performance of a query: Start tinker in the Laravel project directory php artisan tinker

Continue reading

Laravel Eloquent Collection Tips

August 21, 2020 Yvonne Lu Eloquent, Laravel

Adding a column with constant value to existing collection: $existing_col->map(function ($col) { $col[‘url’] = ‘http://your.url/here’; return $col; }); To add

Continue reading

Laravel Migration

August 3, 2020 Yvonne Lu Laravel, PHP

Note: when creating a table with automatically increasing id, for example: $table->increments(‘id’); The type created in a Mysql table is

Continue reading

PHPStorm Quick Keys

August 3, 2020 Yvonne Lu PHP

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)

Continue reading

MYSQLI on PHPStorm Build In Web Server

July 29, 2020 Yvonne Lu MYSQL, PHP

PHPStorm has a build-in web server running at default port 63342.  It works fine in general browser files such as

Continue reading

PHP Anonymous Function

July 27, 2020 Yvonne Lu PHP

$functions = [ ‘function1’ => function ($echo) { echo $echo; } ]; or function do_echo($echo) { echo $echo; } $functions

Continue reading

Laravel Test HTTP Client Calls

May 13, 2020 Yvonne Lu Laravel, PHP

Get a test url from  https://webhook.site/ Make sure Laravel and Guzzle are installed Go to a directory where Laravel is

Continue reading

Laravel Add a Column to a Table

May 6, 2020 Yvonne Lu Laravel, PHP

php artisan make:migration add_colName_to_tableName –table=tableName This will create migration file under the database/migration directory Update in the generated file the

Continue reading

Posts pagination

«Previous Posts 1 2 3 4 5 Next Posts»

Recent Posts

  • Dynatrace links
  • Easy LogIn
  • Typescript notes
  • AWS Connect Metrics
  • DynamoDb to Redshift

Archives

  • February 2025
  • July 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • June 2022
  • May 2022
  • April 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • May 2018
  • April 2018
  • November 2017
  • May 2017
  • April 2017
  • February 2017
  • January 2017
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • November 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • April 2014
WordPress Theme: Tortuga by ThemeZee.